public MainPanel(Simulation controller) {
		this.scape = controller;
		xSize = scape.xSize;
		ySize = scape.ySize;
		setLayout(new GridLayout(xSize, ySize));
		addMouseListener(this);
		labels = new JLabel[xSize][ySize];
		for (int y = 0; y < ySize; y++) {
			for (int x = 0; x < xSize; x++) {
				labels[x][y] = new JLabel("");
				labels[x][y].setOpaque(true);
				labels[x][y].setBorder(BorderFactory.createLineBorder(Color.black));
				labels[x][y].setHorizontalAlignment(SwingConstants.CENTER);
				labels[x][y].setVerticalAlignment(SwingConstants.CENTER);
				add(labels[x][y]);
			}
		}
		update();
	}