diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2025-08-12 08:29:54 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-08-12 08:29:54 +0200 |
| commit | 906f26b753d20ba8f32f3e4c8e7759a2cb0ad958 (patch) | |
| tree | 280f186afddd8957ca4af22f265ae98dbd55644d /go | |
| parent | 8e87600190430bde15429f9aa2bf6d1dff2a8daa (diff) | |
| download | muhqs-game-906f26b753d20ba8f32f3e4c8e7759a2cb0ad958.tar.gz muhqs-game-906f26b753d20ba8f32f3e4c8e7759a2cb0ad958.zip | |
fixup! fix parsing of solid artifacts
Diffstat (limited to 'go')
| -rw-r--r-- | go/game/artifact_test.go | 21 |
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") + } +} |
