Skip to content

Commit

Permalink
Rename welcome message sprite
Browse files Browse the repository at this point in the history
  • Loading branch information
sourabhv committed Jun 18, 2023
1 parent 35ecd44 commit 879c386
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 3 additions & 4 deletions src/entities/welcome_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@

class WelcomeMessage(Entity):
def __init__(self, config: GameConfig) -> None:
image = config.images.welcome_message
super().__init__(
config=config,
image=config.images.message,
x=int(
(config.window.width - config.images.message.get_width()) / 2
),
image=image,
x=(config.window.width - image.get_width()) // 2,
y=int(config.window.height * 0.12),
)
6 changes: 3 additions & 3 deletions src/utils/images.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
class Images:
numbers: List[pygame.Surface]
game_over: pygame.Surface
message: pygame.Surface
welcome_message: pygame.Surface
base: pygame.Surface
background: pygame.Surface
player: Tuple[pygame.Surface]
Expand All @@ -27,8 +27,8 @@ def __init__(self) -> None:
self.game_over = pygame.image.load(
"assets/sprites/gameover.png"
).convert_alpha()
# message sprite for welcome screen
self.message = pygame.image.load(
# welcome_message sprite for welcome screen
self.welcome_message = pygame.image.load(
"assets/sprites/message.png"
).convert_alpha()
# base (ground) sprite
Expand Down

0 comments on commit 879c386

Please sign in to comment.