Skip to content

Commit

Permalink
Fix slider for battle view
Browse files Browse the repository at this point in the history
  • Loading branch information
outkine committed Mar 13, 2024
1 parent 77007dc commit 5e10b4b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/battle/Main.elm
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,12 @@ init flags =
case output of
Ok outputData ->
let
-- we do "- 1" because the battle viewer expects the number of entries
-- in the data array to be one more than the number of turns
-- this is because the last entry in the output is treated as an extra entry:
-- the state of the board after the last turn
turnNum =
List.length outputData.turns
List.length outputData.turns - 1

gridViewerModel =
GridViewer.init turnNum flags.team flags.userOwnsOpponent False
Expand Down

0 comments on commit 5e10b4b

Please sign in to comment.