From 8c3456f5a120a00f8a4e89065d7d50f2c1b4ad0d Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Sat, 4 Feb 2023 18:51:31 +0100 Subject: improve permanent pile support * Fix alot of bugs caused by permanents without tiles * Implement a permanent choice to select the permanents in a pile * Fix how pile hooks are called --- go/game/unit_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'go/game/unit_test.go') diff --git a/go/game/unit_test.go b/go/game/unit_test.go index 341fb350..d6b5b079 100644 --- a/go/game/unit_test.go +++ b/go/game/unit_test.go @@ -44,6 +44,18 @@ symbols: } } + if INVALID_ATTACK(f.Attack) { + t.Fatalf("fisher has an invalid attack") + } + + if a.Attackable() { + t.Fatalf("Piled archer is attackable") + } + + if len(a.AttackableTiles(s.Map)) != 0 { + t.Fatalf("Piled archer has attackable tiles") + } + a.move(s, s.Map.TileAt(Position{1, 1})) if len(f.Pile()) != 0 { t.Fatalf("fisher's pile is not empty") -- cgit v1.2.3