protected Point getTownSnap() {
        Placeable placeable = currentlyPlacing;
        if (placeable != null) {
            int x = (gameController.getCurrentMousePosition().x
                    + gameController.getMapOffsetX())
                    / BlockManager.getBlockWidth()
                    * BlockManager.getBlockWidth();

            int[] xStartEnd = getTownStartEndUnderPlayer();
            if (xStartEnd[0] != -1) {
                if (x < xStartEnd[0]) {
                    x = xStartEnd[0];
                } else if (x + placeable.getWidth() > xStartEnd[1]) {
                    x = xStartEnd[1] - placeable.getWidth();
                }
            }
            int y = findNextFloor(x, placeable.getMapY(), 1) - BlockManager.getBlockHeight();

            if (y <= 0) {
                y = placeable.getMapY();
            }

            Point p = new Point(x, y);
            return p;
        } else {
            return new Point(0, 0);
        }
    }