Follow-up Comment #57, patch #6104 (project freeciv):
Sorry if it's no longer a problem on your latest patch version, but related
to:
> - 'break' does not always work with the _iterate macros (as
> they may hide multiple levels of loops) so you can't really
> count on getting to next round in the loop after one - wrap
> checks for further potential escape tiles to "if (!escaped) {"
In fact you should *not* stop on first suitable direction found. That means
preferring direction 0 over other directions - giving even a advantage to one
player over the other depending which way they look over the border.
Instead you should check all the directions, collect all the 'equally best'
ones (if you have some criteria to prefer escape to one kind of target tile
over escape to other kind of target tile - it might also be that 'equally
best' means simply any tiles that unit can enter) and randomly select one of
them after the loop.
_______________________________________________________
Reply to this item at:
<http://gna.org/patch/?6104>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev