public Point getPosOnGrid(main.position.Point pixelPosition) {
        int xPixel = pixelPosition.getX();
        int yPixel = pixelPosition.getY();
        int xtmp = Board.getSquareWidth();
        int ytmp = Board.getSquareHeight();
        int xGrid = 0;
        int yGrid = 0;

        while (xPixel >= xtmp) {
            xtmp += Board.getSquareWidth();
            xGrid++;
        }
        while (yPixel >= ytmp) {
            ytmp += Board.getSquareHeight();
            yGrid++;
        }

        return new Point(xGrid,yGrid);
    }