diff options
Diffstat (limited to 'go')
| -rw-r--r-- | go/game/phases.go | 28 | ||||
| -rw-r--r-- | go/game/player.go | 2 | ||||
| -rw-r--r-- | go/game/state.go | 6 |
3 files changed, 18 insertions, 18 deletions
diff --git a/go/game/phases.go b/go/game/phases.go index ea239278..b28a28b0 100644 --- a/go/game/phases.go +++ b/go/game/phases.go @@ -3,16 +3,16 @@ package game type PhaseType int const ( - drawPhase = iota + drawStep = iota upkeepPhase actionPhase buyPhase - discardPhase + discardStep ) func (p PhaseType) String() string { switch p { - case drawPhase: + case drawStep: return "Draw" case upkeepPhase: return "Upkeep" @@ -20,7 +20,7 @@ func (p PhaseType) String() string { return "Actions" case buyPhase: return "Buy" - case discardPhase: + case discardStep: return "Discard" } @@ -28,15 +28,15 @@ func (p PhaseType) String() string { } var Phases = struct { - DrawPhase PhaseType - UpkeepPhase PhaseType - ActionPhase PhaseType - BuyPhase PhaseType - DiscardPhase PhaseType + DrawStep PhaseType + UpkeepPhase PhaseType + ActionPhase PhaseType + BuyPhase PhaseType + DiscardStep PhaseType }{ - DrawPhase: drawPhase, - UpkeepPhase: upkeepPhase, - ActionPhase: actionPhase, - BuyPhase: buyPhase, - DiscardPhase: discardPhase, + DrawStep: drawStep, + UpkeepPhase: upkeepPhase, + ActionPhase: actionPhase, + BuyPhase: buyPhase, + DiscardStep: discardStep, } diff --git a/go/game/player.go b/go/game/player.go index c1fb4026..96b95ea5 100644 --- a/go/game/player.go +++ b/go/game/player.go @@ -168,7 +168,7 @@ func (p *Player) DiscardCard(c *Card) { p.Hand.MoveCard(c, p.DiscardPile) } -func (p *Player) discardPhase() { +func (p *Player) discardStep() { if p.Hand.Size() == 0 { return } diff --git a/go/game/state.go b/go/game/state.go index bf977299..261fcb2a 100644 --- a/go/game/state.go +++ b/go/game/state.go @@ -156,7 +156,7 @@ func (s *LocalState) Loop() []*Player { p.Deck.Shuffle(s.Rand) } - s.activePhase = Phases.DrawPhase + s.activePhase = Phases.DrawStep p.Draw() s.activePhase = Phases.UpkeepPhase @@ -171,8 +171,8 @@ func (s *LocalState) Loop() []*Player { p.buyPhase() s.phaseChange() - s.activePhase = Phases.DiscardPhase - p.discardPhase() + s.activePhase = Phases.DiscardStep + p.discardStep() s.endOfTurn() |
