Exemplo n.º 1
0
        public override bool canMove(int CurrentX, int CurrentY, int NewX, int NewY, bool white)//The king canmove checks if the king is able to move iether forwards, bnackwards, diagonal and sideways
        {
            King king = new King();

            if (king.forwardMove(CurrentX, CurrentY, NewX, NewY, white) || king.backwardMove(CurrentX, CurrentY, NewX, NewY) || king.diagonalMove(CurrentX, CurrentY, NewX, NewY, white) || king.sideMove(CurrentX, CurrentY, NewX, NewY, white))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }