public boolean canPlay(Board board)
    {
        boolean canPlay = false;
        int originalx = this.getX();
        int originaly = this.getY();
        int boardmax = board.getSquares().length-1;

        for(Vector2 pos : this.getPossibleMoves())
        {
            if(pos.getX() < 0 || pos.getY() < 0) continue;
            if(pos.getX() > boardmax || pos.getY() > boardmax) continue;
            
            if(checkRouteTo(pos.getX(),pos.getY(),board.getSquares()))
            {
                if(board.getSquares()[pos.getY()][pos.getX()].isEmpty()
                        || board.getSquares()[pos.getY()][pos.getX()].getPiece().isBlack() != this.isBlack())
                {
                    this.setX(pos.getX());
                    this.setY(pos.getY());

                    if(!board.isInCheckColor(this.negra))//If is not in check my color
                    { canPlay = true; break; }
                }
            }
        }

        this.setX(originalx);
        this.setY(originaly);

        return canPlay;
    }