public void keyPressed(KeyEvent e){
key++;
	if(e.getKeyCode()==87){
		//W-Up
		gp.moveDir('u');
	}
	else if(e.getKeyCode()==83){
		//S-Down
		gp.moveDir('d');
	}
  	else if(e.getKeyCode()==68){
		//D-Right
		gp.moveDir('r');
	}
	else if(e.getKeyCode()==65){
		//A-Left
		gp.moveDir('l');
	}else if (e.getKeyCode() == KeyEvent.VK_SPACE) {
		gp.moveDir('s');
	}
	else if(e.getKeyCode()==82){
		//A-Left
		gp.reset();
	}
}