public void TestGetEmptyNeighbours2Edge() { HexBoard hexBoard = new HexBoard(BoardSize); // get the neighbours2 with nothing in between Cell focus = hexBoard.GetCellAt(3, 0); Cell[][] neighbours2EmptyBoard = hexBoard.EmptyNeighbours2(focus); Assert.AreEqual(3, neighbours2EmptyBoard.Length); }
public void TestGetEmptyNeighbours2() { HexBoard hexBoard = new HexBoard(BoardSize); // get the neighbours2 with nothing inbetween Cell focus = hexBoard.GetCellAt(3, 3); Cell[][] neighbours2EmptyBoard = hexBoard.EmptyNeighbours2(focus); // should be six sets Assert.AreEqual(6, neighbours2EmptyBoard.Length); // playing an ajoining cell removes 2 sets hexBoard.PlayMove(3, 4, false); Cell[][] neighbours2PlayedCell = hexBoard.EmptyNeighbours2(focus); Assert.AreEqual(4, neighbours2PlayedCell.Length); }