From 906f26b753d20ba8f32f3e4c8e7759a2cb0ad958 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Tue, 12 Aug 2025 08:29:54 +0200 Subject: fixup! fix parsing of solid artifacts --- go/game/artifact_test.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 go/game/artifact_test.go (limited to 'go') 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") + } +} -- cgit v1.2.3