diff --git a/exercises/concept/ghost-gobble-arcade-game/arcade_game.py b/exercises/concept/ghost-gobble-arcade-game/arcade_game.py index b2848e0c71..55ba409989 100644 --- a/exercises/concept/ghost-gobble-arcade-game/arcade_game.py +++ b/exercises/concept/ghost-gobble-arcade-game/arcade_game.py @@ -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): @@ -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): @@ -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): @@ -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