protected void drawTiles() {
		showedTiles = new BufferedImage(panelWidth, panelHeight, BufferedImage.TYPE_INT_ARGB);
		Graphics2D g2d = (Graphics2D) showedTiles.getGraphics();
		g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
		g2d.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_PURE);
		double[] p;
		for (int i = 0; i < tiles.length; i++) {
			for (int j = 0; j < tiles[0].length; j++) {
				if (tiles[i][j] != null && !board.isCurrentTile(i, j) && tiles[i][j].isShowed()) {
					p = getCoordinates(i, j);
					drawTile(g2d, p[0], p[1], tiles[i][j], width, clip);	
				}
			}
		}
		p = getCoordinates(board.getStartRow(), board.getStartRow());
		g2d.translate(p[0], p[1]);
		drawStartTile(g2d);
		if (!board.isGameOver()) {
			g2d.setColor(getColor(board.getCurrentPlayer()));
			g2d.setStroke(new BasicStroke((float) ((board.getSides() == 4? 2 : 1.7) * width / 36)));
			Point2D p1 = getPointCoordinates(board.getCurrentPlayer() * board.getOpenings(), board.getOpenings(), width, board.getSides() == 4);
			Point2D p2 = getPerpendicularCoordinates(board.getCurrentPlayer() * board.getOpenings(), board.getOpenings(), width, board.getSides() == 4);
			g2d.draw(new Line2D.Double(p1.getX(), p1.getY(), p2.getX(), p2.getY()));
		}
		g2d.translate(-p[0], -p[1]);
	}