public void keyPressed(KeyEvent e) {
		int code = e.getKeyCode();
		if (code == KeyEvent.VK_LEFT) {
			leftPressed = true;
		}
		else if (code == KeyEvent.VK_RIGHT) {
			rightPressed = true;
		}
		else if (code == KeyEvent.VK_UP) {
			upPressed = true;
		}
		else if (code == KeyEvent.VK_P){
			if(isPaused){
				isPaused = false;
			}else if(!isPaused){
				isPaused = true;
			}
		}
	}