public void beginTrainerBattle()
	{
		switch(trainer[trainerToFight].direction)
		{
			case 0:
				if(trainer[trainerToFight].location.x!=location.x-1)
				{
					trainer[trainerToFight].location.x++;

					try
					{
						Thread.sleep(300);
					}
					catch(Exception ignored){}
				}
				else
					trainerBattle();
				break;
			case 90:
				if(trainer[trainerToFight].location.y!=location.y+1)
				{
					trainer[trainerToFight].location.y--;

					try
					{
						Thread.sleep(300);
					}
					catch(Exception ignored){}
				}
				else
					trainerBattle();
				break;
			case 180:
				if(trainer[trainerToFight].location.x!=location.x+1)
				{
					trainer[trainerToFight].location.x--;

					try
					{
						Thread.sleep(300);
					}
					catch(Exception ignored){}
				}
				else
					trainerBattle();
				break;
			case 270:
				if(trainer[trainerToFight].location.y!=location.y-1)
				{
					trainer[trainerToFight].location.y++;

					try
					{
						Thread.sleep(300);
					}
					catch(Exception ignored){}
				}
				else
					trainerBattle();
				break;
		}
	}