diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-02-08 12:47:35 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2023-02-08 12:47:35 +0100 |
| commit | 0602c743f02c89d459594729695bab170a78909a (patch) | |
| tree | e58a407fc98c51f8b4aea056ee2aae4cb7265a2d | |
| parent | b783f0f6fec310805dad04409634ac080dde2f47 (diff) | |
| download | muhqs-game-0602c743f02c89d459594729695bab170a78909a.tar.gz muhqs-game-0602c743f02c89d459594729695bab170a78909a.zip | |
add dummy player to unit tests
| -rw-r--r-- | go/game/unit_test.go | 9 |
1 files changed, 6 insertions, 3 deletions
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()) |
