diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2025-09-04 19:53:52 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-09-04 19:53:52 +0200 |
| commit | 045a2ebbc5cac9ba5bdb707c78fb613454575064 (patch) | |
| tree | edfd1a1c68386cc338962fbc9c14f2339bcd854a /go/game/cardImplementations_test.go | |
| parent | 7ba6e029ce6e90123d867d9ce74ab49420f3f3b9 (diff) | |
| download | muhqs-game-045a2ebbc5cac9ba5bdb707c78fb613454575064.tar.gz muhqs-game-045a2ebbc5cac9ba5bdb707c78fb613454575064.zip | |
implement recycle!
Diffstat (limited to 'go/game/cardImplementations_test.go')
| -rw-r--r-- | go/game/cardImplementations_test.go | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/go/game/cardImplementations_test.go b/go/game/cardImplementations_test.go index 7f0c2878..f75e4d80 100644 --- a/go/game/cardImplementations_test.go +++ b/go/game/cardImplementations_test.go @@ -296,3 +296,32 @@ func TestPatrician(t *testing.T) { t.Fatal("patrician has no armor") } } + +func TestRecycle(t *testing.T) { + s, _, player, _ := newMockState() + player.Resource = 10 + rts := NewPileOfCards() + rts.FromString("[magic/ritual!, magic/ritual!]") + player.DiscardPile.AddPoc(rts) + + r := NewCard("exp1/recycle!") + player.Hand.AddCard(r) + a := NewPlayAction(player, r) + a.Target().AddSelection(rts.Cards()[0]) + a.Target().AddSelection(rts.Cards()[1]) + + s.declareAction(a) + s.stack.pop() + if player.Hand.Size() != 2 { + t.Fatal("Hand does not contain two cards") + } + + player.Hand.MoveInto(player.DiscardPile) + player.DiscardPile.MoveCard(r, player.DiscardPile) + a.Target().AddSelection(rts.Cards()[0]) + s.declareAction(a) + s.stack.pop() + if player.Hand.Size() != 1 { + t.Fatal("Hand does not contain one cards") + } +} |
