|
Expand your game code by figuring out how you would solve the problem manually. It's more than just "going to the dot"; as you manually solve the problem, think of _how_ you are solving the problem -- what things are you looking for when you move the player manually in your game to go to the dot? There are lots of different ways of doing this, and right now don't worry about finding the optimum (best) way. Just find any way of moving the player to the dot. Then code that.
When you're done with that, you can modify your algorithm to find a better way of going to the dot by finding shortcuts and using more direct routes.
But first, just code a way for the player to reach the dot automatically.
Post what you've done and we can help you with the next step.
|