add setup command

This commit is contained in:
stryan 2022-03-07 14:45:14 -05:00
parent 64bab97c38
commit b5fc903394

View File

@ -142,6 +142,15 @@ func (g *Game) Start() bool {
return false 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) { func (g *Game) move(x, y, s, t int) (bool, error) {
startPiece, err := g.Board.GetPiece(x, y) startPiece, err := g.Board.GetPiece(x, y)
if err != nil { if err != nil {