public void keyPressed(KeyEvent e) {
		int key = e.getKeyCode();
		// fires laser
		if (key == KeyEvent.VK_SPACE) {
			if (rateOfFireRemaining <= 0) {
				lasers.add(ship.fire());
				rateOfFireRemaining = rateOfFire;
			}
		}
		if (key == KeyEvent.VK_UP)
			ship.setAccelerating(true);
		if (key == KeyEvent.VK_RIGHT)
			ship.setTurningRight(true);
		if (key == KeyEvent.VK_LEFT)
			ship.setTurningLeft(true);
		if (key == KeyEvent.VK_DOWN)
			ship.setDecelerating(true);
		if (key == KeyEvent.VK_SPACE) {
			if (gameOver) {
				init();
				gameOver = false;
			}

		}
	}