public void TestWrap5y() { DistanceField dut = new DistanceField(5, 7, Tile.Food); Vector2i result = dut.Wrap(new Vector2i(2, 6)); Assert.AreEqual(2, result.x); Assert.AreEqual(6, result.y); }
public void TestWrap4x() { DistanceField dut = new DistanceField(5, 7, Tile.Food); Vector2i result = dut.Wrap(new Vector2i(0, 3)); Assert.AreEqual(0, result.x); Assert.AreEqual(3, result.y); }
public void TestWrap5y() { GameState gameState = TestGameState(5, 7); DistanceField <GameState.Tile> dut = new DistanceField <GameState.Tile>(gameState, gameState.map, tile => tile.isFood); Vector2i result = dut.Wrap(new Vector2i(2, 6)); Assert.AreEqual(2, result.x); Assert.AreEqual(6, result.y); }