From 6eb0e55dcce70b6693c1250ff53f9064fcd72ff4 Mon Sep 17 00:00:00 2001 From: Luke Meyers Date: Sun, 9 Feb 2020 00:11:30 -0800 Subject: [PATCH] tiny refactor --- game/commands.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/game/commands.go b/game/commands.go index 36fcb21..4e7526e 100644 --- a/game/commands.go +++ b/game/commands.go @@ -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()