Example #1
0
        public void PieceMove(string Piece, int x, int y, Board[,] MyBoard, Button[,] MyButton)
        {
            switch (Piece)
            {
            case "Pawn":
                Pawn.Move(x, y, MyBoard, MyButton);
                break;

            case "Rook":
                Rook.Move(x, y, MyBoard, MyButton);
                break;

            case "Bishop":
                Bishop.Move(x, y, MyBoard, MyButton);
                break;

            case "Queen":
                Queen.Move(x, y, MyBoard, MyButton);
                break;

            case "King":
                King.Move(x, y, MyBoard, MyButton);
                break;

            case "Knight":
                Knight.Move(x, y, MyBoard, MyButton);
                break;
            }
        }
Example #2
0
        public virtual void canMove(int Xcoord, int Ycoord, Board[,] MyBoard, Button[,] MyButton)
        {
            Rook   MyRook   = new Rook(color);
            Bishop MyBishop = new Bishop(color);

            MyBishop.Move(Xcoord, Ycoord, MyBoard, MyButton);
            MyRook.Move(Xcoord, Ycoord, MyBoard, MyButton);
        }
Example #3
0
        public override void Move(int Xcoord, int Ycoord, Board[,] MyBoard, Button[,] MyButton)
        {
            Rook   MyRook   = new Rook(color);
            Bishop MyBishop = new Bishop(color);

            MyBishop.Move(Xcoord, Ycoord, MyBoard, MyButton);
            MyRook.Move(Xcoord, Ycoord, MyBoard, MyButton);
        }