Hmm...I tried to implement this exact concept in my Pacman game, but it took too long so I said the heck with it and that's why the AI sucks.
Hmm...I tried to implement this exact concept in my Pacman game, but it took too long so I said the heck with it and that's why the AI sucks.
Well, there are a few things wrong with your code:
1) It does not work.
2) It does not work.
3) It does not work.
Hope this helps.