public void toggle(KeyEvent key, boolean pressed){
		int keyCode = key.getKeyCode();
	
		if(keyCode == KeyEvent.VK_UP) up = pressed;
		if(keyCode == KeyEvent.VK_DOWN) down = pressed;
		if(keyCode == KeyEvent.VK_LEFT) left = pressed;
		if(keyCode == KeyEvent.VK_RIGHT) right = pressed;
	}