You could check if there is a wall over the ghost.
If not, it will "random generate a number to choose which way to go".
Type: Posts; User: minju
You could check if there is a wall over the ghost.
If not, it will "random generate a number to choose which way to go".
So your problem is that when the ghost hits a wall with the speed of 5px the ghost moves into the wall 5px before it chooses another direction?