I have a problem on this site: http://www.dark-project.cz/wesnoth/map-view/1 (click on the unit). In my Javascript source http://www.dark-project.cz/wesnoth/js/map/base.js (last $('div.unitImg').click(function()
function) I want to mark all hexagons to which the unit can't go.
I have quite a complex algorithm that works right when the movement is 1, but if it is higher it doesn't work (try movement 2).
Do you have some idea about an algorithm to find the right hexes?
Here is an example of the coordinate numbering: http://www.dark-project.cz/wesnoth/coor.png
Thank you for all replies.