rename UpdateState to checkWin

This commit is contained in:
Luke Meyers 2020-02-09 08:40:52 -08:00
parent 6a9943993c
commit 06abd29278
2 changed files with 2 additions and 2 deletions

View File

@ -35,7 +35,7 @@ func CommandLoop(w *pixelgl.Window, s State, stateCA chan<- State) {
for i, cmd := range <-cmdC { for i, cmd := range <-cmdC {
s = doCommand(cmd, s, i) s = doCommand(cmd, s, i)
} }
s = UpdateState(s, sOld) s = checkWin(s, sOld)
turn++ turn++
if s.GameOver { if s.GameOver {
s = NewState() s = NewState()

View File

@ -42,7 +42,7 @@ type Baton struct {
HolderID int HolderID int
} }
func UpdateState(s State, sOld State) State { func checkWin(s State, sOld State) State {
var winners []int var winners []int
for _, t := range s.Teams { for _, t := range s.Teams {
if r := ActiveRacer(t); r != nil { if r := ActiveRacer(t); r != nil {