public CController(JFrame frame) {
		this.frame = frame;

		//let's create the mine sweepers
		for (int i = 0; i < CParams.iNumSweepers; i++) {
			sweeperPositions.add(new CMinesweeper(i == 0));
		}

		//initialize mines in random positions within the application window
		for (int i=0; i < CParams.iNumMines; i++) {
			minePositions.add(new SVector2D(Utils.RandDouble() * cxClient, Utils.RandDouble() * cyClient));
		}

		//fill the vertex buffers
		for (int i = 0; i < sweeperModel.length; i++) {
			sweeperVertexBuffer.add(new SPoint(sweeperModel[i]));
		}

		for (int i = 0; i < mineModel.length; ++i) {
			mineVertexBuffer.add(new SPoint(mineModel[i]));
		}
		
		frame.addKeyListener(new KeyListener() {

			public void keyPressed(KeyEvent e) {
				
				switch(e.getKeyCode()) {
					case 32:
						break;
					case 37:
						// Turn Left
						sweeperPositions.get(0).m_lTrack -= 0.01;
						sweeperPositions.get(0).m_rTrack += 0.01;
						break;
					case 38:
						double avg = (sweeperPositions.get(0).m_lTrack + sweeperPositions.get(0).m_lTrack) / 2;
						// Increase speed go straight
						sweeperPositions.get(0).m_lTrack = avg + 0.01;
						sweeperPositions.get(0).m_rTrack = avg + 0.01;
						break;
					case 39:
						// Turn Right
						sweeperPositions.get(0).m_lTrack += 0.01;
						sweeperPositions.get(0).m_rTrack -= 0.01;
						break;
					case 40:
						// Slow down
						sweeperPositions.get(0).m_lTrack -= 0.01;
						sweeperPositions.get(0).m_rTrack -= 0.01;
						break;
					default:
						System.out.println(e);
				}
				Update();
			}
			public void keyTyped(KeyEvent e) {}
			public void keyReleased(KeyEvent e) {}
		});
	}