private void drawGrid(Graphics g) {
		int xp = WIDTH / 2 - boxSize * lines;
		int yp = HEIGHT / 2 - boxSize * lines / 2;
		boxX1 = xp;
		boxX2 = (boxX1 + boxSize * lines);
		boxY1 = yp;
		boxY2 = (boxY1 + boxSize * lines);

		g.setColor(new Color(0));
		for (int y = 0; y < lines + 1; y++) {
			int ya = yp + boxSize * y;
			g.drawLine(xp, ya, xp + boxSize * lines, ya);
		}
		for (int x = 0; x < lines + 1; x++) {
			int xa = xp + boxSize * x;
			g.drawLine(xa, yp, xa, yp + boxSize * lines);
		}
		int xOffset = WIDTH / 2;
		int yOffset = (int) Math.ceil(HEIGHT / 5.25D);
		for (int y = 0; y < 4; y++) {
			int ya = yp + boxSize * y;
			g.drawLine(xOffset + xp, yOffset + ya, xOffset + xp + boxSize * 3, yOffset + ya);
		}
		for (int x = 0; x < 4; x++) {
			int xa = xp + boxSize * x;
			g.drawLine(xOffset + xa, yOffset + yp, xOffset + xa, yOffset + yp + boxSize * 3);
		}
		g.drawRect(xp + xOffset - 1, yp + yOffset - 1, boxSize * 3 + 2, boxSize * 3 + 2);
		g.drawRect(xp + xOffset - 2, yp + yOffset - 2, boxSize * 3 + 4, boxSize * 3 + 4);
		g.drawRect(boxX1 + boxSize * 0 + 1, boxY1 + boxSize * 0 + 1, boxSize * 3 - 2, boxSize * 3 - 2);
		g.drawRect(boxX1 + boxSize * 3 + 1, boxY1 + boxSize * 0 + 1, boxSize * 3 - 2, boxSize * 3 - 2);
		g.drawRect(boxX1 + boxSize * 6 + 1, boxY1 + boxSize * 0 + 1, boxSize * 3 - 2, boxSize * 3 - 2);
		g.drawRect(boxX1 + boxSize * 0 + 1, boxY1 + boxSize * 3 + 1, boxSize * 3 - 2, boxSize * 3 - 2);
		g.drawRect(boxX1 + boxSize * 3 + 1, boxY1 + boxSize * 3 + 1, boxSize * 3 - 2, boxSize * 3 - 2);
		g.drawRect(boxX1 + boxSize * 6 + 1, boxY1 + boxSize * 3 + 1, boxSize * 3 - 2, boxSize * 3 - 2);
		g.drawRect(boxX1 + boxSize * 0 + 1, boxY1 + boxSize * 6 + 1, boxSize * 3 - 2, boxSize * 3 - 2);
		g.drawRect(boxX1 + boxSize * 3 + 1, boxY1 + boxSize * 6 + 1, boxSize * 3 - 2, boxSize * 3 - 2);
		g.drawRect(boxX1 + boxSize * 6 + 1, boxY1 + boxSize * 6 + 1, boxSize * 3 - 2, boxSize * 3 - 2);
	}