2021-10-05 12:19:15 +00:00
|
|
|
[< Back](../README.md)
|
|
|
|
|
2021-09-13 12:50:41 +00:00
|
|
|
# Exercise: Increased Ghost Speed
|
|
|
|
|
2021-10-05 12:29:27 +00:00
|
|
|
## Background:
|
|
|
|
|
2021-10-05 08:37:48 +00:00
|
|
|
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.
|
2021-09-13 12:50:41 +00:00
|
|
|
|
2021-10-05 08:37:48 +00:00
|
|
|
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.
|
2021-09-13 12:50:41 +00:00
|
|
|
|
2021-10-05 08:37:48 +00:00
|
|
|
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.
|
2021-09-13 12:50:41 +00:00
|
|
|
|
|
|
|
Also ask yourself, how would you test this?
|
2021-10-05 12:29:27 +00:00
|
|
|
|
|
|
|
## Exercise
|
|
|
|
|
|
|
|
1.
|