diff --git a/internal/game/game.go b/internal/game/game.go index 1475bcd..43654af 100644 --- a/internal/game/game.go +++ b/internal/game/game.go @@ -186,8 +186,17 @@ func (g *Game) PlayerStateAct(id int, cmd string) *GameView { if g.Status == StatusReady { //first turn g.Status = StatusPlaying } - g.CanDraw = true - g.HasDrawn = false + //skip draw step when 0 life + if id == SentinalID && g.SentinalPlayer.Life <= 0 { + g.CanDraw = false + g.HasDrawn = true + } else if id == ScourgeID && g.ScourgePlayer.Life <= 0 { + g.CanDraw = false + g.HasDrawn = true + } else { + g.CanDraw = true + g.HasDrawn = false + } if id != g.CurrentTurn { return nil }