@Override
	public void keyPressed(KeyEvent e) {
		if (e.getKeyCode() == KeyEvent.VK_LEFT) 
			leftPressed = true;
		if (e.getKeyCode() == KeyEvent.VK_RIGHT)
				rightPressed = true;
		if (e.getKeyCode() == KeyEvent.VK_UP)
				upPressed = true;
		if (e.getKeyCode() == KeyEvent.VK_SPACE)
			spacePressed = true;
		
		//random teleport to random part of the screen with random rotation when t is pressed
		if (e.getKeyCode() == KeyEvent.VK_T && ship !=null) {
			ship.setPosition(random.nextDouble()*SIZE, random.nextDouble()*SIZE);
			ship.setRotation(random.nextDouble()*2*Math.PI);
		}
	}