func (g *Game) updateStatus(m message.Message) {
	var snagDisabled, swapDisabled, startDisabled, finishDisabled bool
	switch m.Game.Status {
	case game.NotStarted:
		snagDisabled = true
		swapDisabled = true
		finishDisabled = true
	case game.InProgress:
		startDisabled = true
		finishDisabled = m.Game.TilesLeft > 0
	case game.Finished:
		snagDisabled = true
		swapDisabled = true
		startDisabled = true
		finishDisabled = true
	default:
		return
	}
	statusText := m.Game.Status.String()
	g.setFinalBoards(m.Game.FinalBoards)
	g.dom.SetValue(".game>.info .status", statusText)
	g.dom.SetButtonDisabled(".game .actions>.snag", snagDisabled)
	g.dom.SetButtonDisabled(".game .actions>.swap", swapDisabled)
	g.dom.SetButtonDisabled(".game .actions>.start", startDisabled)
	g.dom.SetButtonDisabled(".game .actions>.finish", finishDisabled)
	g.canvas.SetGameStatus(m.Game.Status)
}
// updateStatus sets the statusText and enables or disables the snag, swap, start, and finish buttons.
updateStatus sets the statusText and enables or disables the snag, swap, start, and finish buttons.
// updateStatus sets the statusText and enables or disables the snag swap start and finish buttons .
func (g *Game) updateStatus(m message.Message) {
	var snagDisabled, swapDisabled, startDisabled, finishDisabled bool
	switch m.Game.Status {
	case game.NotStarted:
		snagDisabled = true
		swapDisabled = true
		finishDisabled = true
	case game.InProgress:
		startDisabled = true
		finishDisabled = m.Game.TilesLeft > 0
	case game.Finished:
		snagDisabled = true
		swapDisabled = true
		startDisabled = true
		finishDisabled = true
	default:
		return
	}
	statusText := m.Game.Status.String()
	g.setFinalBoards(m.Game.FinalBoards)
	g.dom.SetValue(".game>.info .status", statusText)
	g.dom.SetButtonDisabled(".game .actions>.snag", snagDisabled)
	g.dom.SetButtonDisabled(".game .actions>.swap", swapDisabled)
	g.dom.SetButtonDisabled(".game .actions>.start", startDisabled)
	g.dom.SetButtonDisabled(".game .actions>.finish", finishDisabled)
	g.canvas.SetGameStatus(m.Game.Status)
}
func ( g * Game ) updateStatus ( m message . Message ) { var snagDisabled , swapDisabled , startDisabled , finishDisabled bool switch m . Game . Status { case game . NotStarted : snagDisabled = true swapDisabled = true finishDisabled = true case game . InProgress : startDisabled = true finishDisabled = m . Game . TilesLeft > 0 case game . Finished : snagDisabled = true swapDisabled = true startDisabled = true finishDisabled = true default : return } statusText := m . Game . Status . String ( ) g . setFinalBoards ( m . Game . FinalBoards ) g . dom . SetValue ( " " , statusText ) g . dom . SetButtonDisabled ( " " , snagDisabled ) g . dom . SetButtonDisabled ( " " , swapDisabled ) g . dom . SetButtonDisabled ( " " , startDisabled ) g . dom . SetButtonDisabled ( " " , finishDisabled ) g . canvas . SetGameStatus ( m . Game . Status ) }
updateStatus sets the statusText and enables or disables the snag, swap, start, and finish buttons.
updateStatus sets the statusText and enables or disables the snag swap start and finish buttons .