From d37eb4f8e229db5cbf8fccdc71b1cb99096be3dc Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Wed, 8 Feb 2023 12:47:35 +0100 Subject: add dummy player to unit tests --- go/game/unit_test.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'go') diff --git a/go/game/unit_test.go b/go/game/unit_test.go index 53b585d8..c4a92372 100644 --- a/go/game/unit_test.go +++ b/go/game/unit_test.go @@ -21,13 +21,16 @@ symbols: r := strings.NewReader(mapDef) s.Map, _ = readMap(r) - f := NewUnit(NewCard("nautics/fisher"), s.Map.TileAt(Position{2, 2}), nil) + s.AddNewPlayer("player", NewDeck()) + p := s.Players[0] + + f := NewUnit(NewCard("nautics/fisher"), s.Map.TileAt(Position{2, 2}), p) s.AddPermanent(f) - a := NewUnit(NewCard("base/archer"), s.Map.TileAt(Position{1, 1}), nil) + a := NewUnit(NewCard("base/archer"), s.Map.TileAt(Position{1, 1}), p) s.AddPermanent(a) - sword := newEquipmentFromPath("base/sword", s.Map.TileAt(Position{0, 1}), nil) + sword := newEquipmentFromPath("base/sword", s.Map.TileAt(Position{0, 1}), p) s.AddPermanent(sword) a.move(s, f.Tile()) -- cgit v1.2.3