Code cleanup

Repositioning Scoreboard to center of top
This commit is contained in:
2024-01-30 21:18:27 +01:00
parent 92fd4a4cb2
commit d0bbdfd6f1
2 changed files with 20 additions and 4 deletions

View File

@@ -171,11 +171,13 @@ class Player(GameObject_new):
) -> None:
self._size = size
self._score = 0
self._rect:pygame.Rect
super().__init__(name, surface, surface_size, init_pos_x, init_pos_y, visibility)
__movedirection = {"up":False, "down":False, "left":False, "right":False}
__snake_body = [[100,100], [100,140], [100,180], [100,220]]
__test_counter = 0
def user_test_func(self):
pass
@@ -231,6 +233,9 @@ class Player(GameObject_new):
def get_rect_size(self):
return self._size
def get_rect(self) -> pygame.Rect:
return self._rect
def get_player_score(self) -> int:
return self._score