public void checkMovement()
	{
		if(forceBike)
		{
			bicycling=true;
		}

		try
		{
			if(!cartographer)
			{
				if(!bicycling)
					Thread.sleep(150);
				else
					Thread.sleep(50);

				movingFrame=(movingFrame+1)%2;

				if(movingFrame==0&&moving)
				{
					checkPoison();
				}
				else
				{
					drawPoison=false;
				}
			}
			else
				Thread.sleep(100);
		}
		catch(Exception e){e.printStackTrace();}


		switch(direction)
		{
			case 90:
				if(canMove())
					if(location.y>0)
						location.y--;
				break;
			case 270:
				if(canMove())
					if(location.y<getAreaHeight())
						location.y++;
				break;
			case 180:
				if(canMove())
					if(location.x>0)
						location.x--;
				break;
			case 0:
				if(canMove())
					if(location.x<getAreaWidth())
						location.x++;
				break;
		}

		if(surfing&&area==Area.Recursive_Hot_Springs)
			healPokemonNoPrompt();

		if(repelSteps>1)
		{
			repelSteps--;
		}
		else if(repelSteps==1)
		{
			repelSteps=0;
			moving=false;

			messageBox=new ErrorWindow();
			messageBox.addMessage("Your repel effect wore off!","Uh oh!");

			messageBox.repaint();
			while(messageBox.isVisible())
			{
				try
				{
					Thread.sleep(10);
				}
				catch(Exception e){e.printStackTrace();}
			}

			return;
		}
		else if(tileSet == OUTDOORS && !cartographer&&canEncounter(currentArea[location.x][location.y])&&!alreadyBattled)
			wildEncounter();
		else if(tileSet == INDOORS && !cartographer&&canEncounter(currentArea[location.x][location.y])&&!alreadyBattled)
			wildEncounter();

		if(!cartographer)
		switchMap();
	}