In the original game of pacman. Eeach ghost has a specific logic to where to go.
This needs a direction variable to know where the user is heading. Also there's going to be a few edge cases. Other than that. The ghost will need a mode variable. Which will be useful when attempting to implement Issue #5 . This can be easily implemented since i already know when the user hits any specific arrow key, thanks to the keyIsDown() function
[x] The pink Ghost targets the player but when he gets close he becomes afraid and runs away.
[x] The blue Ghost targets 2 tiles ahead of the player.
[x] The Grey Ghost targets the area around the player.
In the original game of pacman. Eeach ghost has a specific logic to where to go.
This needs a
direction
variable to know where the user is heading. Also there's going to be a few edge cases. Other than that. The ghost will need a mode variable. Which will be useful when attempting to implement Issue #5 . This can be easily implemented since i already know when the user hits any specific arrow key, thanks to thekeyIsDown()
function