public void Returns_Capture_When_Move_To_Opponent_Occupied_Square() { _blackStart = new BoardCoordinate(1, 4); _board.AddPiece(_blackQueen, _blackStart); var move = new MoveAttempt(_board, _whiteStart, _blackStart); var moveResult = _referee.TryMove(move); var endPiece = _board.GetPiece(_blackStart); Assert.IsTrue(moveResult == MoveResult.Captured(_blackQueen) && endPiece == _whiteQueen); }
public void Returns_Capture_When_Capturing_Check() { var king = new King(PlayerColor.Black); var kingStart = new BoardCoordinate(1, 8); _board.AddPiece(king, kingStart); _blackStart = new BoardCoordinate(8, 1); _board.AddPiece(_blackQueen, _blackStart); var move = new MoveAttempt(_board, _blackStart, _whiteStart); var moveResult = _referee.TryMove(move); Assert.AreEqual(MoveResult.Captured(_whiteQueen), moveResult); }