Laser Squad [Day 27] – Simliar gameplay like the original

I don’t like to do this often, but the next thing I wanted to implement required refactoring again. It can be very time consuming when you’re implementing features just to test them and then later want to connect these features with the actual gameplay that you have in mind. In my case, I finished first the movement of one unit on the map. Then I added other units and teams. Now it’s time to introduce the cursor on map, the selection mode, which both have an influence which options are shown in the game menu.

The players turn in the original Laser Squad starts with a cursor centered on the map. You could move the cursor and explore the map. You could select an unit, move it, take actions and then deselect it to move to the next unit. A unit is also automatically deselected when AP’s reached zero. Today I finished the cursor moving, unit selecting, unit moving and unit deselecting. The options “next unit” and “end turn” are also working. Now the gameplay works exactly like in the original game, and I’m very pleased about that. The part which worked before, but now it’s not compatible with the new code is that a unit can take actions on a s specific tile. I’ll finish that next time.

* * * * *