Clean up turn-based code

Mostly style nits, but also:

- Renamed some stuff in anticipation of removing GameEnded.

- Actor decisions are independent, so there's no need to do most of them
  in the first part of a tic and the player in the second part; they can
  all happen together in the second part.

- waiting_for_input was merged into turn_based, which I think makes it
  easier to follow what's going on between tics.  Although I just
  realized it introduces a bug, so, better fix that next.

- The canvas didn't need to know if we were waiting or not if we just
  force the tic offset to 1 while waiting.  This also fixed some slight
  jitter with force floors.
This commit is contained in:
Eevee (Evelyn Woods) committed 2020-11-03 09:50:37 -07:00
1 parent 83a1dd23ff
commit e7e02281a2
4 files changed
+266 -275

No files matched your search

+1 -1
View File
@@ -121,7 +121,7 @@
<button class="control-restart" type="button">Restart</button>
<button class="control-undo" type="button">Undo</button>
<button class="control-rewind" type="button">Rewind <span class="keyhint">(z)</span></button>
<input class="turn-based" type="checkbox">Turn-Based</input>
<label><input class="control-turn-based" type="checkbox"> Turn-based mode</label>
</div>
<div class="demo-controls">
<button class="demo-play" type="button">View replay</button>