public void keyPressed(KeyEvent e)
		{

			if(count>=3 && count<5)
				picnum=6;
			if(count>4)
				picnum=7;
			if(count<3)
				picnum=5;
		int key = e.getKeyCode();
		if(key == 37)
			direction = LEFT;
		else if(key == 38)
			direction = UP;
		else if(key == 39)
			direction = RIGHT;
		else if (key == 40)
			direction = DOWN;
		else if(key==32)
			space=true;
		}