tiny refactor

This commit is contained in:
Luke Meyers 2020-02-09 00:11:30 -08:00
parent 25cafe9999
commit 6eb0e55dcc
1 changed files with 1 additions and 2 deletions

View File

@ -32,8 +32,7 @@ func CommandLoop(w *pixelgl.Window, s State, stateCA chan<- State) {
w.SetClosed(true)
return
case w.JustPressed(pixelgl.KeyEnter) || w.Pressed(pixelgl.KeySpace) || true:
cmds := <-cmdC
s = UpdateState(s, sOld, cmds)
s = UpdateState(s, sOld, <-cmdC)
turn++
if s.GameOver {
s = NewState()