public boolean CheckValidMove(int mouseX, int mouseY, int lastX, int lastY){    
        //Prohibed colors
        try {
            //Prohibed colors
            BufferedImage table_image = ImageIO.read(new File(table_back_img));//grid estrategico
            Color color = new Color(table_image.getRGB(mouseX, mouseY));
            if(color.equals(red)) return false;
            if(color.equals(green)) return false;
        } catch (IOException e) {
            e.printStackTrace();
        }

        //Can olnly move one square at a time
        if((Math.abs(mouseX - lastX) == side && Math.abs(mouseY - lastY) == 0   ) || //left right
           //(Math.abs(mouseX - lastX) == side && Math.abs(mouseY - lastY) == side) || //diagonals
           (Math.abs(mouseX - lastX) == 0    && Math.abs(mouseY - lastY) == side) //|| //up down
           //(Math.abs(mouseX - lastX) == 0    && Math.abs(mouseY - lastY) == 0)   //same  place
           ){ 
            return true;
        }
        else{
            return false;
        }
    }