Adding ghost exercises.

This commit is contained in:
Ólafur Waage 2021-09-13 14:50:41 +02:00
parent c95fddc481
commit acc49c9593

21
exercises-3.md Normal file
View file

@ -0,0 +1,21 @@
## Exercises
# Exercise: Increased Ghost Speed
Currently the ghosts move at a fixed rate. But in the original game, the ghosts would move slightly faster and faster as the game went on.
Implement a way to incrementally increase the ghost speed over time. The speed function takes in the current game state so that can be used. The speed should not slowly increase for each update, so something like adding onto the speed value over time is not correct behavior.
You could increase the speed after each time the ghost is eaten for example, or increment the speed by a certain amount after N seconds.
Also ask yourself, how would you test this?
# Exercise: Add Blinky as a Ghost
We have three ghosts within the project. Clyde, Inky and Pinky. But Blinky is missing. Implement Blinky and their behavior.
Blinky always chases PacMan so the only thing you should need is where PacMan is currently located. But Blinky also has the scatter behavior as the other ghosts.
# Exercise: ?
Extra