From 06abd29278a0e85a1241e96617bf5bc1e157fcb2 Mon Sep 17 00:00:00 2001 From: Luke Meyers Date: Sun, 9 Feb 2020 08:40:52 -0800 Subject: [PATCH] rename UpdateState to checkWin --- game/commands.go | 2 +- game/game.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/game/commands.go b/game/commands.go index 6ff591f..e8b942a 100644 --- a/game/commands.go +++ b/game/commands.go @@ -35,7 +35,7 @@ func CommandLoop(w *pixelgl.Window, s State, stateCA chan<- State) { for i, cmd := range <-cmdC { s = doCommand(cmd, s, i) } - s = UpdateState(s, sOld) + s = checkWin(s, sOld) turn++ if s.GameOver { s = NewState() diff --git a/game/game.go b/game/game.go index 0a8edac..837e794 100644 --- a/game/game.go +++ b/game/game.go @@ -42,7 +42,7 @@ type Baton struct { HolderID int } -func UpdateState(s State, sOld State) State { +func checkWin(s State, sOld State) State { var winners []int for _, t := range s.Teams { if r := ActiveRacer(t); r != nil {