aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--go/game/artifact_test.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/go/game/artifact_test.go b/go/game/artifact_test.go
new file mode 100644
index 00000000..84c15652
--- /dev/null
+++ b/go/game/artifact_test.go
@@ -0,0 +1,21 @@
+package game
+
+import (
+ "testing"
+)
+
+func TestSolid(t *testing.T) {
+ p := NewArtifactFromPath("base/palisade", NewMockTile(), NewMockPlayer())
+ if !p.Attackable() {
+ t.Fatal("palisade not attackable")
+ }
+
+ if p.IsDestroyed() {
+ t.Fatal("palisade already destroyed")
+ }
+
+ p.adjustDamage(6)
+ if !p.IsDestroyed() {
+ t.Fatal("palisade not destroyed")
+ }
+}