Talk:Complete Roguelike Tutorial, using python+libtcod, part 6
Guys, i have a little advice for AI section.
When we are setting properties of our object, we are creating wrong movement rules (which allows monsters to run into 4 directions instead of 8). Player will broke 4-dir chains later, but now i propose a little piece of code which helps the reader to make good chasing algorithm.
As you can see bellow, i am using rude algorithm instead of "round" operation as this one doesn't allow us to make proper 8-direction integer.
Instead of move toward section we should include this into our code: