From c24a241758381b9c97dd4062a01a545687336812 Mon Sep 17 00:00:00 2001 From: BethanyG Date: Sat, 9 May 2026 12:09:17 -0700 Subject: [PATCH] Updated docstrings in stub to use Google Style. --- .../ghost-gobble-arcade-game/arcade_game.py | 40 +++++++++++++------ 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/exercises/concept/ghost-gobble-arcade-game/arcade_game.py b/exercises/concept/ghost-gobble-arcade-game/arcade_game.py index b2848e0c718..adb546aa1c9 100644 --- a/exercises/concept/ghost-gobble-arcade-game/arcade_game.py +++ b/exercises/concept/ghost-gobble-arcade-game/arcade_game.py @@ -4,9 +4,13 @@ def eat_ghost(power_pellet_active, touching_ghost): """Verify that Pac-Man can eat a ghost if he is empowered by a power pellet. - :param power_pellet_active: bool - does the player have an active power pellet? - :param touching_ghost: bool - is the player touching a ghost? - :return: bool - can a ghost be eaten? + Parameters: + power_pellet_active (bool): Does the player have an active power pellet? + touching_ghost (bool): Is the player touching a ghost? + + Returns: + bool: Can a ghost be eaten? + """ pass @@ -15,9 +19,13 @@ def eat_ghost(power_pellet_active, touching_ghost): def score(touching_power_pellet, touching_dot): """Verify that Pac-Man has scored when a power pellet or dot has been eaten. - :param touching_power_pellet: bool - is the player touching a power pellet? - :param touching_dot: bool - is the player touching a dot? - :return: bool - has the player scored or not? + Parameters: + touching_power_pellet (bool): Is the player touching a power pellet? + touching_dot (bool): Is the player touching a dot? + + Returns: + bool: Has the player scored or not? + """ pass @@ -26,9 +34,12 @@ def score(touching_power_pellet, touching_dot): def lose(power_pellet_active, touching_ghost): """Trigger the game loop to end (GAME OVER) when Pac-Man touches a ghost without his power pellet. - :param power_pellet_active: bool - does the player have an active power pellet? - :param touching_ghost: bool - is the player touching a ghost? - :return: bool - has the player lost the game? + Parameters: + power_pellet_active (bool): Does the player have an active power pellet? + touching_ghost (bool): Is the player touching a ghost? + + Returns: + bool: Has the player lost the game? """ pass @@ -37,10 +48,13 @@ def lose(power_pellet_active, touching_ghost): def win(has_eaten_all_dots, power_pellet_active, touching_ghost): """Trigger the victory event when all dots have been eaten. - :param has_eaten_all_dots: bool - has the player "eaten" all the dots? - :param power_pellet_active: bool - does the player have an active power pellet? - :param touching_ghost: bool - is the player touching a ghost? - :return: bool - has the player won the game? + Parameters: + has_eaten_all_dots (bool): Has the player "eaten" all the dots? + power_pellet_active (bool): Does the player have an active power pellet? + touching_ghost (bool): Is the player touching a ghost? + + Returns: + bool: Has the player won the game? """ pass