public void FlatEquality() { Stone stone1 = new Flatstone(Colour.White); Stone stone2 = new Flatstone(Colour.White); Stone stone3 = new Flatstone(Colour.Black); Stone stone4 = new Flatstone(Colour.Black); Assert.AreEqual(stone1, stone2); Assert.AreEqual(stone3, stone4); Assert.AreNotEqual(stone2, stone3); }
public void StandingEquality() { Stone stone1 = new Flatstone(Colour.White); Stone stone2 = new Flatstone(Colour.White); Stone stone3 = new Flatstone(Colour.Black); Stone stone4 = new Flatstone(Colour.Black); stone2.Standing = true; stone3.Standing = true; stone4.Standing = true; Assert.AreNotEqual(stone1, stone2); Assert.AreNotEqual(stone2, stone3); Assert.AreEqual(stone3, stone4); }
public void StandingRoad() { GameBoard board = new GameBoard(5); Stone standingStone = new Flatstone(Colour.White); standingStone.Standing = true; board.PlaceStone(0, 0, standingStone); board.PlaceStone(1, 0, standingStone); board.PlaceStone(2, 0, standingStone); board.PlaceStone(3, 0, standingStone); board.PlaceStone(4, 0, standingStone); board.EndTurn(); Assert.AreEqual(board.GameState, GameState.InProgress); }
public void PlaceStone() { GameBoard board1 = new GameBoard(5); GameBoard board2 = new GameBoard(5); board1.Turn = Colour.Black; board2.Turn = Colour.Black; board2.PlaceStone(0, 0, new Flatstone(Colour.Black)); board2.PlaceStone(4, 4, new Flatstone(Colour.Black)); Stone stone = new Flatstone(Colour.Black); stone.Standing = true; board2.PlaceStone(1, 3, stone); board2.PlaceStone(2, 2, new Capstone(Colour.Black)); board2.PlaceStone(3, 1, new Flatstone(Colour.Black)); Interpreter.Input("a1", board1); Interpreter.Input("e5", board1); Interpreter.Input("Sb4", board1); Interpreter.Input("Cc3", board1); Interpreter.Input("d2", board1); Assert.AreEqual(board1, board2); }