From b5fc90339454b71f51e9f717e47391f41b1fa210 Mon Sep 17 00:00:00 2001 From: Steve Date: Mon, 7 Mar 2022 14:45:14 -0500 Subject: [PATCH] add setup command --- game.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/game.go b/game.go index 80ae018..dbbe322 100644 --- a/game.go +++ b/game.go @@ -142,6 +142,15 @@ func (g *Game) Start() bool { return false } +//Setup puts the game in setup mode +func (g *Game) Setup() bool { + if g.State == gameLobby { + g.State = gameSetup + return true + } + return false +} + func (g *Game) move(x, y, s, t int) (bool, error) { startPiece, err := g.Board.GetPiece(x, y) if err != nil {