public void DoMovePieceTest1() { commandMove.Do(g); TileTypes[,] expectedTiles = { { TileTypes.Default, TileTypes.BallPlayer0, TileTypes.PiecePlayer0 }, { TileTypes.PiecePlayer0, TileTypes.Default, TileTypes.Default }, { TileTypes.PiecePlayer1, TileTypes.BallPlayer1, TileTypes.PiecePlayer1 } }; for (int i = 0; i < g.Board.BoardSize; i++) { for (int j = 0; j < g.Board.BoardSize; j++) { Assert.IsTrue(g.Board.Tiles[i, j] == expectedTiles[i, j]); } } }
public void DoMovePieceTest3() { commandMove = new MovePiece(-1, -1, g.Board.BoardSize - 1, 0); commandMove.Do(g); Assert.IsTrue(g.Board.Tiles[g.Board.BoardSize - 1, 0] == TileTypes.PiecePlayer1); }