maybe dont make the game entirely unplayable

This commit is contained in:
stryan 2021-11-16 16:51:19 -05:00
parent 99938e1447
commit d30493e529

View File

@ -52,7 +52,7 @@ func NewGame(sentDeck []int, scoDeck []int) *Game {
} }
func (g *Game) String() string { func (g *Game) String() string {
return fmt.Sprintf("Sen(%v): %v\n\n%v\n\nSco(%v): %v\nStatus:%v Draw:%v Turn:%v\nBuffers\nCardBuffer:%v\nSB:%v BB:%v\nEffectTarget:%v\nQueuedEffect:%v", g.SentinalPlayer.Life, g.SentinalPlayer.Hand, g.GameBoard, g.ScourgePlayer.Life, g.ScourgePlayer.Hand, g.Status, g.CanDraw, g.CurrentTurn, g.CardBuffer, g.ScryBuffer, g.CardBuffer, g.TargetReq, g.QueuedEffect) return fmt.Sprintf("Sen(%v): %v\n\n%v\n\nSco(%v): %v\nStatus:%v Draw:%v Turn:%v\nBuffers\nCardBuffer:%v\nSB:%v BB:%v\nEffectTarget:%v\nQueuedEffect:%v\n", g.SentinalPlayer.Life, g.SentinalPlayer.Hand, g.GameBoard, g.ScourgePlayer.Life, g.ScourgePlayer.Hand, g.Status, g.CanDraw, g.CurrentTurn, g.CardBuffer, g.ScryBuffer, g.CardBuffer, g.TargetReq, g.QueuedEffect)
} }
func (g *Game) Parse(cmd *Command) *CommandResult { func (g *Game) Parse(cmd *Command) *CommandResult {
@ -222,7 +222,7 @@ func (g *Game) PlayerStateAct(id int, cmd string) *GameView {
} }
func (g *Game) PlayerAct(id int, cmd string) *Deck { func (g *Game) PlayerAct(id int, cmd string) *Deck {
if g.Status != StatusLobby { if g.Status != StatusPlaying {
return nil return nil
} }
if id != g.CurrentTurn { if id != g.CurrentTurn {