Beispiel #1
0
        public void CreatePiece_Will_Create_A_Pawn()
        {
            var chessBoard = ChessApi.Factory.CreateChessBoard();
            var piece      = ChessFactory.CreatePiece(PieceColor.White, chessBoard, PieceType.Pawn);

            Assert.IsInstanceOfType(piece, typeof(Pawn));
            Assert.AreEqual(piece.PieceColor, PieceColor.White);
            Assert.AreEqual(piece.ChessBoard, chessBoard);
            Assert.AreEqual(piece.PieceType, PieceType.Pawn);
        }
Beispiel #2
0
 public static IPiece CreatePawn(PieceColor pieceColor, IChessBoard chessBoard) =>
 ChessFactory.CreatePiece(pieceColor, chessBoard, PieceType.Pawn);
Beispiel #3
0
 public static IChessBoard CreateChessBoard() =>
 ChessFactory.CreateChessBoard();