@Override
	protected void paintComponent(Graphics g) {
		super.paintComponent(g);

		GameField field = gameView.getField();

		int w = field.getWidth();
		int h = field.getHeight();

		Square[][] map = field.getMap();
		int x;
		int y;

		g.setColor(BACKGROUND_COLOR);
		g.fillRect(0, 0, w * SQUARE_SIZE, h * SQUARE_SIZE);

		Image image = null;

		for (int i = 0; i < h; ++i) {
			for (int j = 0; j < w; ++j) {
				image = gameView.getSquareImage(map[i][j]);
				y = i * SQUARE_SIZE;
				x = j * SQUARE_SIZE;
				g.drawImage(image, x, y, SQUARE_SIZE, SQUARE_SIZE, null);
			}
		}
		
		for (BuildingView building : gameView.getBuildings()) {
			g.drawImage(building.getImage(), building.getX() * SQUARE_SIZE, building.getY() * SQUARE_SIZE, SQUARE_SIZE, SQUARE_SIZE, null);
		}
		
		for (UnitView unit : gameView.getUnits()) {
			g.drawImage(unit.getImage(), unit.getX() * SQUARE_SIZE, unit.getY() * SQUARE_SIZE, SQUARE_SIZE, SQUARE_SIZE, null);
		}
		
		if (gameView.isSelected()) {
			g.setColor(Color.RED);
			for (Point point : gameView.getSelectedSquares()) {
				g.drawRect(point.x * SQUARE_SIZE, point.y * SQUARE_SIZE, SQUARE_SIZE, SQUARE_SIZE);
			}
		}
		
		g.setColor(Color.RED);
		g.drawRect(0, 0, w * SQUARE_SIZE, h * SQUARE_SIZE);
	}