private void paintState(Graphics2D g, float hairline) {
		g.setColor(Color.GRAY);

		// Draw cells.
		g.setStroke(new BasicStroke(hairline));
		for (int x = 0; x < board.getWidth(); x++) {
			for (int y = 0; y < board.getHeight(); y++) {
				g.draw(new Rectangle2D.Double(x + WALL_THICKNESS / 2, y
						+ WALL_THICKNESS / 2, 1 - WALL_THICKNESS,
						1 - WALL_THICKNESS));
			}
		}

		g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
				RenderingHints.VALUE_ANTIALIAS_ON);

		// Draw walls.
		for (int x = 0; x < board.getWidth() - 1; x++) {
			for (int y = 0; y < board.getHeight() - 1; y++) {
				Wall wall = board.getWall(new Position(x, y));
				if (wall != null) {
					drawWall(g, hairline, wall, x, y, false);
				}
			}
		}

		// Draw players.
		for (Player p : board.getPlayers()) {
			drawPlayer(g, hairline, p, p.getPosition(), false);
		}

		// Draw shadow.
		if (isShadowLegal()) {
			if (shadow instanceof PutWall) {
				PutWall pw = (PutWall) shadow;
				drawWall(g, hairline, pw.getWall(), pw.getPosition().getX(), pw
						.getPosition().getY(), true);
			} else if (shadow instanceof Jump) {
				Jump j = (Jump) shadow;
				drawPlayer(g, hairline, board.getTurn(), j.getNewPosition(),
						true);
			}
		}
	}