public void move()
	{
		if(state == UP) //check up and left
		{
			y = y - 25; //check above you
			sense(a); //feel the wall
			if(hit == true)// if you bump, change direction to right
			{
				y = ly; //go back to last position
				hit = false; //reset hit counter
				state = RIGHT; // change state to going to the right
				System.out.println("right");
				return;
			}
			else // if not...
			{
				ly = y; //permanently change position
				x = x - 25; //check left
				sense(a);
				if(hit == true) //if bump, keep going up and checking left
				{
					x = lx; //move back
					hit = false; //reset hit counter
				}
				else
				{
					System.out.println("left");
					state= LEFT; //otherwise start going left
					lx = x;
					return;
				}
				
			}
		}
		if(state == DOWN)
		{
			y = y + 25; //check below you
			sense(a);
			if(hit == true)// if you bump, change direction to left
			{
				y = ly;
				hit = false;
				state = LEFT;
				System.out.println("left");
				return;
			}
			else // if not...
			{
				ly = y;
				x = x + 25; //check right
				sense(a);
				if(hit == true) //if bump, keep going down and checking right
				{
					x = lx;
					hit = false;
				}
				else
				{
					state= RIGHT; //otherwise start going right
					lx = x;
					System.out.println("right");
					return;
				}
				
			}
		}
		if(state == LEFT)
		{
			x = x - 25; //check to the left
			sense(a);
			if(hit == true)// if you bump, change direction to UP
			{
				x = lx;
				hit = false;
				state = UP;
				System.out.println("up");
				return;
			}
			else // if not...
			{
				lx = x;
				y = y + 25; //check down
				sense(a);
				if(hit == true) //if bump, keep going left and checking down
				{
					y = ly;
					hit = false;
				}
				else
				{
					ly = y;
					state= DOWN; //otherwise start going left
					System.out.println("down");
					return;
				}
				
			}
		}
		if(state == RIGHT)
		{
			x = x + 25; //check to the right
			sense(a);
			if(hit == true)// if you bump, change direction to down
			{
				x = lx;
				hit = false;
				state = DOWN;
				System.out.println("DOWN");
				return;
			}
			else // if not...
			{
				lx = x;
				y = y - 25; //check UP
				sense(a);
				if(hit == true) //if bump, keep going right and checking up
				{
					y = ly;
					hit = false;
				}
				else
				{
					ly = y;
					state= UP; //otherwise start going up
					System.out.println("UP");
					return;
				}
			}
		}
	}