diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2025-06-25 11:07:04 -0500 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-07-03 22:01:22 -0400 |
| commit | c831f2908c0a50344293d0d39ca4daabbca35434 (patch) | |
| tree | 27631efa6dfa9c1deea011836cc04bf5ed965a60 | |
| parent | 844b302ea1f8154010af39b3303790dc12b04737 (diff) | |
| download | muhqs-game-c831f2908c0a50344293d0d39ca4daabbca35434.tar.gz muhqs-game-c831f2908c0a50344293d0d39ca4daabbca35434.zip | |
change phase names to match the rules
| -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() |
