示例#1
0
        public void CanMoveTo_correct(int x, int y)
        {
            ChessBoard board = new ChessBoard();

            new BlackPawn(new Point(2, 4), board);
            new BlackPawn(new Point(4, 4), board);
            Piece whitePawn = new WhitePawn(new Point(3, 3), board);

            Assert.IsTrue(whitePawn.canMoveTo(new Point(x, y)));
        }
示例#2
0
        public void CanMoveTo_false_becouse_King_is_checked(int x, int y)
        {
            ChessBoard board = new ChessBoard();

            new BlackPawn(new Point(2, 4), board);
            new BlackPawn(new Point(4, 4), board);
            new Queen("Black", new Point(3, 0), board);
            Piece whitePawn = new WhitePawn(new Point(3, 3), board);

            Assert.IsFalse(whitePawn.canMoveTo(new Point(x, y)));
        }