private void updateScreen() {
		bufferStrat = getBufferStrategy();
		graphics = null;

		try {
			graphics = bufferStrat.getDrawGraphics();
			Graphics2D graphics2D = (Graphics2D) graphics;
			RenderingHints renderHints = new RenderingHints(
					RenderingHints.KEY_ANTIALIASING,
					RenderingHints.VALUE_ANTIALIAS_ON);
			graphics2D.setRenderingHints(renderHints);
			if (clicked || forceUpdate) {
				clicked = false;
				clearWindow();
				if (gameVisible) {
					drawGrid();
					drawInfo();
					drawPieces();
				}
				if (clientServerVisible) {
					drawClientServer();
				}
				if (clientScreenVisible) {
					drawClientScreen();
				}
				if (serverScreenVisible) {
					drawServerScreen();
				}
				if (localScreenVisible) {
					drawLocalScreen();
				}
				drawButtons();
				processClick(xClick, yClick);

			}
			drawTime();
			if (advWithVisible) {
				drawFlashingBox(180, yMax - 40, 38, 240);
				ticked = false;
			}
			

		} catch (Exception e) {
			System.out.println("Error: " + e.getMessage());
		} finally {

		}
		graphics.dispose();
		bufferStrat.show();
		Toolkit.getDefaultToolkit().sync();
		forceUpdate = false;
	}