aboutsummaryrefslogtreecommitdiff
path: root/go/game/cardImplementations_test.go
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2025-09-04 20:01:27 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2025-09-04 20:01:27 +0200
commit5898ef394b5ee99a1c7bf75b6dfcaf039eb00945 (patch)
treeabdb63624534249ff68dda1cd60f04eda15cc126 /go/game/cardImplementations_test.go
parent045a2ebbc5cac9ba5bdb707c78fb613454575064 (diff)
downloadmuhqs-game-5898ef394b5ee99a1c7bf75b6dfcaf039eb00945.tar.gz
muhqs-game-5898ef394b5ee99a1c7bf75b6dfcaf039eb00945.zip
implement power_to_the_people!
Diffstat (limited to 'go/game/cardImplementations_test.go')
-rw-r--r--go/game/cardImplementations_test.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/go/game/cardImplementations_test.go b/go/game/cardImplementations_test.go
index f75e4d80..b3ac5811 100644
--- a/go/game/cardImplementations_test.go
+++ b/go/game/cardImplementations_test.go
@@ -325,3 +325,24 @@ func TestRecycle(t *testing.T) {
t.Fatal("Hand does not contain one cards")
}
}
+
+func TestPowerToThePeople(t *testing.T) {
+ s, _, player, _ := newMockState()
+ player.Resource = 3
+
+ for y := range 2 {
+ for x := range 2 {
+ s.addNewUnit(NewCard("base/archer"), Position{x, y}, player)
+ }
+ }
+
+ c := NewCard("exp1/power_to_the_people!")
+ player.Hand.AddCard(c)
+ a := NewPlayAction(player, c)
+
+ s.declareAction(a)
+ s.stack.pop()
+ if player.Resource != 4 {
+ t.Fatal("Not gained 4 resource")
+ }
+}