public void GetCellsBetween_A1_Cell_And_D5_Cell_Should_Return_null() { BoardGame boardGame = new BoardGame(); boardGame.InitBoardGame(); var A1Coordinate = new BoardCoordinates(1, 1); var D5Coordinate = new BoardCoordinates(4, 5); var res = boardGame.GetCellsBetween(boardGame.Cells.At(A1Coordinate), boardGame.Cells.At(D5Coordinate)); Assert.Null(res); }
public void GetCellsBetween_A1_Cell_And_A5_Cell_Should_Return_List_Of_5_Cells() { BoardGame boardGame = new BoardGame(); boardGame.InitBoardGame(); var A1Coordinate = new BoardCoordinates(1, 1); var A5Coordinate = new BoardCoordinates(1, 5); var res = boardGame.GetCellsBetween(boardGame.Cells.At(A1Coordinate), boardGame.Cells.At(A5Coordinate)); Assert.True(res.Count == 5); }
public void GetCellsBetween_A1_Cell_And_A5_Cell_Should_Return_List_Of_5_Cells_That_Matches_Cells_A1_To_A5() { BoardGame boardGame = new BoardGame(); boardGame.InitBoardGame(); var A1Coordinate = new BoardCoordinates(1, 1); var A5Coordinate = new BoardCoordinates(1, 5); var expectedMatchList = new List <BoardCell>() { boardGame.Cells[0], boardGame.Cells[1], boardGame.Cells[2], boardGame.Cells[3], boardGame.Cells[4] }; var res = boardGame.GetCellsBetween(boardGame.Cells.At(A1Coordinate), boardGame.Cells.At(A5Coordinate)); Assert.Equal(expectedMatchList, res); }