diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-02-08 12:47:35 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-01-27 16:43:48 +0100 |
| commit | 5b46d139c555fc45b9021b99de297114dfbffaa8 (patch) | |
| tree | 33b2d98777c66143a051c7208d4d3fff142e4dde /go | |
| parent | 5dae3b7e97669bc6ad5dfc61bbb1903aeb03aaf3 (diff) | |
| download | muhqs-game-5b46d139c555fc45b9021b99de297114dfbffaa8.tar.gz muhqs-game-5b46d139c555fc45b9021b99de297114dfbffaa8.zip | |
add dummy player to unit tests
Diffstat (limited to 'go')
| -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()) |
