Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions exercises/concept/ghost-gobble-arcade-game/arcade_game.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def eat_ghost(power_pellet_active, touching_ghost):
:return: bool - can a ghost be eaten?
"""

pass
return power_pellet_active and touching_ghost


def score(touching_power_pellet, touching_dot):
Expand All @@ -19,8 +19,8 @@ def score(touching_power_pellet, touching_dot):
:param touching_dot: bool - is the player touching a dot?
:return: bool - has the player scored or not?
"""

pass
return touching_power_pellet or touching_dot



def lose(power_pellet_active, touching_ghost):
Expand All @@ -30,8 +30,8 @@ def lose(power_pellet_active, touching_ghost):
:param touching_ghost: bool - is the player touching a ghost?
:return: bool - has the player lost the game?
"""

pass
return touching_ghost and not power_pellet_active



def win(has_eaten_all_dots, power_pellet_active, touching_ghost):
Expand All @@ -43,4 +43,4 @@ def win(has_eaten_all_dots, power_pellet_active, touching_ghost):
:return: bool - has the player won the game?
"""

pass
return has_eaten_all_dots and touching_ghost and not power_pellet_active