joulupunikki / Phoenix

Java clone/remake/patch of the game Emperor of the Fading Suns
https://joulupunikki.github.io/Phoenix/
37 stars 14 forks source link

Unit iterator/Next stack button stuck with cargo #35

Closed joulupunikki closed 9 years ago

joulupunikki commented 9 years ago

If there is cargo in a stack then the iteration through unmoved units will get stuck on that stack. If the cargo is removed the iteration will proceed.

The code seems substandard, debugging/re-factoring may be a waste of time. Perhaps a rewrite from scratch is in order, this is a critical feature and just one method.

The next unmoved unit procedure could be the following:

sub a: Check if there are unmoved units left. If not, display "no unmoved units" and exit.

  1. do sub a
  2. Remove currently selected units from list of unmoved units.
  3. do sub a
  4. Select next unmoved unit(s) (*)
  5. Center display on stack.

(*) What this means exactly, eg. whole stack or something else, is open for debate. For now, we'll settle with selecting all units in the stack with the next unmoved unit.