2021-10-05 12:19:15 +00:00
|
|
|
[< Back](../README.md)
|
|
|
|
|
2021-10-05 10:51:55 +00:00
|
|
|
# Exercise: PacMan Bot
|
|
|
|
|
2021-10-05 12:29:27 +00:00
|
|
|
## Background:
|
|
|
|
|
2021-10-05 10:51:55 +00:00
|
|
|
PacMan can be controlled with the keyboard, but those inputs can be automated. The only thing that needs to change is
|
|
|
|
the value within the InputState class.
|
|
|
|
|
|
|
|
Start by giving InputState random values on each update and then program in a fixed set of movement. For example "Go
|
|
|
|
Right for 3 seconds, then down, right, up, right". This should pickup the first super pellet.
|
|
|
|
|
|
|
|
In this exercise, the input code in processEvents is not needed.
|
2021-10-05 12:29:27 +00:00
|
|
|
|
|
|
|
## Exercise
|
|
|
|
|
|
|
|
1.
|