maybe dont make the game entirely unplayable
This commit is contained in:
parent
99938e1447
commit
d30493e529
4
game.go
4
game.go
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user