Skip to content

Commit

Permalink
fix semantics to specify a ghost (#3702)
Browse files Browse the repository at this point in the history
  • Loading branch information
demeesterdev authored May 21, 2024
1 parent 3f106bb commit c137fcf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ You have four rules to implement, all related to the game states.
## 1. Define if Pac-Man eats a ghost

Define the `eat_ghost()` function that takes two parameters (_if Pac-Man has a power pellet active_ and _if Pac-Man is touching a ghost_) and returns a Boolean value if Pac-Man is able to eat the ghost.
Define the `eat_ghost()` function that takes two parameters (_if Pac-Man has a power pellet active_ and _if Pac-Man is touching a ghost_) and returns a Boolean value if Pac-Man is able to eat a ghost.
The function should return `True` only if Pac-Man has a power pellet active and is touching a ghost.

```python
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def eat_ghost(power_pellet_active, touching_ghost):
: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 the ghost be eaten?
:return: bool - can a ghost be eaten?
"""

return power_pellet_active and touching_ghost
Expand Down
2 changes: 1 addition & 1 deletion exercises/concept/ghost-gobble-arcade-game/arcade_game.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def eat_ghost(power_pellet_active, touching_ghost):
: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 the ghost be eaten?
:return: bool - can a ghost be eaten?
"""

pass
Expand Down

0 comments on commit c137fcf

Please sign in to comment.