Forum Message
| City: | Winnipeg, MB  | | Personal Data: | Male, | | Membership | 23years 166days ago. | | Last Login | 4years 19days ago. | | Last Move | 4years 141days ago. | TnT is currently  | Send a mail to TnT |
| | Message text Hi
I believe there are a ton of people involved in software on this site - so please feel free to critique this solution...
I am not sure I see what the problem is (which probably means it is as difficult as you suggest)
If you break the movement phase into impulses of 1 hex moves - and then move EVERY ship 1 hex at a time, and then check for collision (ie two ships in the same hex) at the end of each impulse. Then if there is a collision, you do not need to backtrack the relevant ships.
This should work even for ships moving at different speeds - the slower ships will simply sit in the last hex while the other ships continue to move. Not realistic, but I believe this is how the rules interpret the situation.
I am pretty sure this gives the same result - it does add a slight computational overhead as each ship must be moved one hex at a time - but I do not think this will be too bad.
Does this help at all?
|
|
|
|
|