public void switchMap()
	{
		switch(area)
		{
			case Stringville:
				if (location.y==0 && direction == 90)
				{
					if(location.x==10)
					{
						transition=true;
						bgm.stop();
						area=Area.Route_1;
						location.x=18;
						location.y=59;
						createCurrentArea();
					}
					if(location.x==11)
					{
						transition=true;
						bgm.stop();
						area=Area.Route_1;
						location.x=19;
						location.y=59;
						createCurrentArea();
					}
				}
				if(location.x==49 && direction == 0)
				{
					if(location.y==14||location.y==15)
					{
						transition=true;
						bgm.stop();
						area=Area.Route_0;
						location.x=0;
						if(location.y==14)
							location.y=12;
						else
							location.y=13;
						createCurrentArea();
					}
					if (location.y >= 27 && location.y <= 44 && surfing)
					{
						transition=true;
						bgm.stop();
						area=Area.Route_0;
						location.x=0;
						location.y-=2;
						createCurrentArea();
					}
				}
				if (location.x==5 && location.y == 37)
				{
					pokeCenterTransfer();
				}
				if (location.x == 11 && location.y == 39)
				{
					pokeMartTransfer();
				}
				if (location.x == 15 && location.y == 11)
				{
					transition=false;
					bgm.stop();
					area=Area.YourHouse;
					location.x=5;
					location.y=8;
					createCurrentArea();
				}
				if (location.x == 27 && location.y == 17)
				{
					transition=false;
					bgm.stop();
					area=Area.Rival_House;
					location.x=5;
					location.y=8;
					createCurrentArea();
				}
				if (location.x == 32 && location.y == 9)
				{
					transition=false;
					area=Area.Babbs_Lab;
					location.x=4;
					location.y=12;
					bgm.stop();
					createCurrentArea();
				}
				if ((location.x == 23 && location.y == 7) || (location.x == 35 && location.y == 17))
				{
					if (location.x == 23 && location.y == 7)
					houseInt=0;
					else
					houseInt=1;
					transition=false;
					bgm.stop();
					returnArea = Area.Stringville;
					returnPoint.x = location.x;
					returnPoint.y = location.y+1;
					area=Area.Generic_1;
					location.x=2;
					location.y=7;
					createCurrentArea();
				}
				if (location.x == 30 && location.y == 37)
				{
					houseInt = 0;
					genericTransfer(Area.Gym_1,7,14);
				}
				break;
			case Args_Harbor:
				if (location.x==0 && direction == 180)
				{
					if(location.y==28)
					{
						transition=true;
						bgm.stop();
						area=Area.Route_0;
						location.x=59;
						location.y=12;
						createCurrentArea();
					}
					if(location.y==29)
					{
						transition=true;
						bgm.stop();
						area=Area.Route_0;
						location.x=59;
						location.y=13;
						createCurrentArea();
					}


					if (location.y >= 41 && location.y <= 64 && surfing)
					{
						transition=true;
						bgm.stop();
						area=Area.Route_0;
						location.x=59;
						location.y-=16;
						createCurrentArea();
					}

				}
				if (location.x==3 && location.y == 27)
				{
					pokeCenterTransfer();
				}
				if (location.x==9 && location.y == 45)
				{
					pokeMartTransfer();
				}
				if (location.y == 0 && direction == 90)
				{
					if (location.x >= 3 && location.x <= 48 && surfing)
					{
						transition=true;
						bgm.stop();
						area=Area.Route_8;
						location.y=63;
						createCurrentArea();
					}
				}
				if (location.x == 38 && location.y == 23)
				{
					houseInt=0;
					genericTransfer(Area.Gym_2,12,14);
				}
				if (location.x == 59 && direction == 0)
				{
					if (location.y == 16 || location.y == 17)
					{
						transition=true;
						bgm.stop();
						area=Area.Route_14;
						location.x=0;
						location.y-=2;
						createCurrentArea();
					}
				}
				if (location.x == 25 && location.y == 29)
				{
					houseInt=0;
					genericTransfer(Area.Generic_2, 2, 7);
				}
				if (location.x == 35 && location.y == 31)
				{
					houseInt=1;
					genericTransfer(Area.Generic_2, 2, 7);
				}
				if (location.x == 21 && location.y == 19)
				{
					houseInt=2;
					genericTransfer(Area.Generic_2, 2, 7);
				}
				if (location.x == 17 && location.y == 33)
				{
					houseInt=3;
					genericTransfer(Area.Generic_2, 2, 7);
				}
				if (location.x == 29 && location.y == 17)
				{
					genericTransfer(Area.Lighthouse,5,11);
				}
				if (location.x == 50 && location.y == 57)
				{
					transition=true;
					bgm.stop();
					area=Area.Challenge_Cave;
					location.x=112;
					location.y=115;
					createCurrentArea();
				}
				break;
			case Route_0:
				if (location.x==0 && direction == 180)
				{
					if(location.y==12)
					{
						transition=true;
						bgm.stop();
						area=Area.Stringville;
						location.x=49;
						location.y=14;
						createCurrentArea();
					}
					else if(location.y==13)
					{
						transition=true;
						bgm.stop();
						area=Area.Stringville;
						location.x=49;
						location.y=15;
						createCurrentArea();
					}

					if (location.y >= 25 && location.y <= 42 && surfing)
					{
						transition=true;
						bgm.stop();
						area=Area.Stringville;
						location.x=49;
						location.y+=2;
						createCurrentArea();
					}
				}
				if (location.x==59 && direction == 0)
				{
					if(location.y==12)
					{
						transition=true;
						bgm.stop();
						area=Area.Args_Harbor;
						location.x=0;
						location.y=28;
						createCurrentArea();
					}
					else if(location.y==13)
					{
						transition=true;
						bgm.stop();
						area=Area.Args_Harbor;
						location.x=0;
						location.y=29;
						createCurrentArea();
					}

					if (location.y >= 25 && location.y <= 48 && surfing)
					{
						transition=true;
						bgm.stop();
						area=Area.Args_Harbor;
						location.x=0;
						location.y+=16;
						createCurrentArea();
					}
				}
				break;
			case Route_1:
				if (location.y==59 && direction == 270)
				{
					if(location.x==18)
					{
						transition=true;
						bgm.stop();
						area=Area.Stringville;
						location.x=10;
						location.y=0;
						createCurrentArea();
					}
					else if(location.x==19)
					{
						transition=true;
						bgm.stop();
						area=Area.Stringville;
						location.x=11;
						location.y=0;
						createCurrentArea();
					}
				}
				if (location.x==39 && direction == 0)
				{
					if (location.y == 8 || location.y == 9)
					{
						transition=true;
						bgm.stop();
						area=Area.Route_2;
						location.x=0;
						if(location.y==8)
							location.y=28;
						else
							location.y=29;
						createCurrentArea();
					}
				}
				if (location.x == 4 && direction == 180)
				{
					if (location.y == 20 || location.y == 21)
					{
						transition=false;
						bgm.stop();
						area=Area.H_Border;
						houseInt=0;
						location.x=9;
						location.y-=16;
						createCurrentArea();
					}
				}
				if (location.x == 31 && location.y == 39)
				{
					houseInt=4;
					genericTransfer(Area.Generic_2, 2, 7);
				}
				break;
			case Route_2:
				if (location.x == 0 && direction == 180)
				{
					if (location.y == 28 || location.y == 29)
					{
						transition=true;
						bgm.stop();
						area=Area.Route_1;
						location.x=39;
						if(location.y==28)
							location.y=8;
						else
							location.y=9;
						createCurrentArea();
					}
				}
				if (location.y == 0 && direction == 90)
				{
					if (location.x >= 24 && location.x <= 27)
					{
						transition=true;
						bgm.stop();
						area=Area.Nested_Village;
						location.y=45;
						createCurrentArea();
					}
					if (location.x >= 5 && location.x <= 22 && surfing)
					{
						transition=true;
						bgm.stop();
						area=Area.Nested_Village;
						location.y=45;
						createCurrentArea();
					}
					if (location.x >= 29 && location.x <= 42 && surfing)
					{
						transition=true;
						bgm.stop();
						area=Area.Nested_Village;
						location.y=45;
						createCurrentArea();
					}
				}
				if (location.x == 25 && location.y == 29)
				{
					transition=false;
					bgm.stop();
					area=Area.V_Border;
					houseInt=2;
					location.x=4;
					location.y=7;
					createCurrentArea();
				}
				if (location.y == 15 && direction == 270)
				{
					if (location.x == 25 || location.x == 26)
					{
						transition=false;
						bgm.stop();
						area=Area.V_Border;
						houseInt = 3;
						location.y=1;
						location.x-=21;
						createCurrentArea();
					}
				}
				if (location.x == 13 && location.y == 11)
				{
					houseInt=2;
					genericTransfer(Area.Generic_1, 2, 7);
				}
				break;
			case Pokecenter:
				if (location.y == 8 && direction == 270)
				{
					if (location.x == 6 || location.x == 7)
					{
						transition=false;
						bgm.stop();
						area=returnArea2;
						location.x=returnPoint2.x;
						location.y=returnPoint2.y;
						createCurrentArea();
					}
				}
				break;
			case Nested_Village:
				if (location.y == 45 && direction == 270)
				{
					if (location.x >= 24 && location.x <= 27)
					{
						transition=true;
						bgm.stop();
						area=Area.Route_2;
						location.y=0;
						createCurrentArea();
					}
					if (location.x >= 5 && location.x <= 22 && surfing)
					{
						transition=true;
						bgm.stop();
						area=Area.Route_2;
						location.y=0;
						createCurrentArea();
					}
					if (location.x >= 29 && location.x <= 42 && surfing)
					{
						transition=true;
						bgm.stop();
						area=Area.Route_2;
						location.y=0;
						createCurrentArea();
					}
				}
				if (location.x == 27 && location.y == 23)
				{
					pokeCenterTransfer();
				}
				if (location.x == 33 && location.y == 23)
				{
					pokeMartTransfer();
				}
				if (location.x == 0 && direction == 180)
				{
					if (location.y >= 22 && location.y <= 27)
					{
						transition=true;
						bgm.stop();
						area=Area.Route_3;
						location.x=49;
						location.y+=10;
						createCurrentArea();
					}
				}
				if (location.x == 49 && direction == 0)
				{
					if (location.y >= 37 && location.y <= 43)
					{
						transition=true;
						bgm.stop();
						area=Area.Route_ARRAYINDEXOUTOFBOUNDSEXCEPTION;
						location.x=0;
						location.y-=18;
						createCurrentArea();
					}
				}
				if (location.x == 21 && location.y == 23)
				{
					houseInt=0;
					genericTransfer(Area.Generic_3,2,7);
				}
				if (location.x == 19 && location.y == 29)
				{
					houseInt=1;
					genericTransfer(Area.Generic_3,2,7);
				}
				if (location.x == 25 && location.y == 15)
				{
					houseInt=2;
					genericTransfer(Area.Generic_3,2,7);
				}
				break;
			case Mart:
				if (location.y == 8 && direction == 270)
				{
					if (location.x == 2 || location.x == 3)
					{
						transition=false;
						bgm.stop();
						area=returnArea;
						location.x=returnPoint.x;
						location.y=returnPoint.y;
						createCurrentArea();
					}
				}
				break;
			case Route_3:
				if (location.x == 49 && direction == 0)
				{
					if (location.y >= 32 && location.y <= 37)
					{
						transition=true;
						bgm.stop();
						area=Area.Nested_Village;
						location.x=0;
						location.y-=10;
						createCurrentArea();
					}
				}
				if (location.x == 0 && direction == 180)
				{
					if (location.y >= 8 && location.y <= 9)
					{
						transition=true;
						bgm.stop();
						area=Area.Villa_Del_Joe;
						location.x=75;
						location.y+=44;
						createCurrentArea();
					}
					if (location.y >= 34 && location.y <= 37)
					{
						transition=true;
						bgm.stop();
						area=Area.Route_11;
						location.x=69;
						location.y-=28;
						createCurrentArea();
					}
				}
				if (location.x == 22 && location.y == 9)
				{
					transition=true;
					bgm.stop();
					area=Area.Public_Cave;
					location.x=8;
					location.y=90;
					createCurrentArea();
				}
				if (location.x == 37 && location.y == 5)
				{
					transition=true;
					bgm.stop();
					area=Area.Public_Cave;
					location.x=25;
					location.y=87;
					createCurrentArea();
				}
				break;
			case Public_Cave:
				if (location.x == 8 && location.y == 91)
				{
					transition=true;
					bgm.stop();
					area=Area.Route_3;
					location.x=22;
					location.y=10;
					createCurrentArea();
				}
				if (location.x == 25 && location.y == 88)
				{
					transition=true;
					bgm.stop();
					area=Area.Route_3;
					location.x=37;
					location.y=6;
					createCurrentArea();
				}
				if (location.x == 78 && location.y == 83)
				{
					transition=true;
					bgm.stop();
					area=Area.Route_6;
					location.x=8;
					location.y=10;
					createCurrentArea();
				}
				if (location.x == 50 && location.y == 64)
				{
					transition=true;
					bgm.stop();
					area=Area.Route_10;
					location.x=8;
					location.y=34;
					createCurrentArea();
				}
				if (location.x == 11 && direction == 90 && location.y == 70)
				{
					location.y=63;
				}
				if (location.x == 11 && direction == 270 && location.y == 63)
				{
					location.y=70;
				}
				break;
			case Villa_Del_Joe:
				if (location.x == 75 && direction == 0)
				{
					if (location.y == 52 || location.y == 53)
					{
						transition=true;
						bgm.stop();
						area=Area.Route_3;
						location.x=0;
						location.y-=44;
						createCurrentArea();
					}
					if (location.y == 10 || location.y == 11)
					{
						transition=true;
						bgm.stop();
						area=Area.Route_4;
						location.x=0;
						location.y+=78;
						createCurrentArea();
					}
				}
				if (location.x == 25 && location.y == 31)
				{
					pokeCenterTransfer();
				}
				if (location.x == 63 && location.y == 35)
				{
					houseInt=3;
					genericTransfer(Area.Generic_1, 2, 7);
				}
				if (location.x == 51 && location.y == 47)
				{
					houseInt=4;
					genericTransfer(Area.Generic_1, 2, 7);
				}
				if (location.x == 51 && location.y == 57)
				{
					houseInt=5;
					genericTransfer(Area.Generic_1, 2, 7);
				}
				if (location.x == 51 && location.y == 23)
				{
					houseInt=6;
					genericTransfer(Area.Generic_1, 2, 7);
				}
				if (location.x == 63 && location.y == 9)
				{
					houseInt=7;
					genericTransfer(Area.Generic_1, 2, 7);
				}
				if (location.x == 43 && location.y == 1)
				{
					houseInt=8;
					genericTransfer(Area.Generic_1, 2, 7);
				}
				if (location.x == 31 && location.y == 1)
				{
					houseInt=9;
					genericTransfer(Area.Generic_1, 2, 7);
				}
				if (location.x == 23 && location.y == 53)
				{
					houseInt=10;
					genericTransfer(Area.Generic_1, 2, 7);
				}
				if (location.x == 29 && location.y == 31)
				{
					houseInt=11;
					genericTransfer(Area.Generic_1, 2, 7);
				}
				if (location.x == 8 && location.y == 5)
				{
					houseInt = 0;
					genericTransfer(Area.Gym_3,9,19);
				}
				if (location.x == 5 && location.y == 49)
				{
					genericTransfer(Area.J_Inc_Radio_Tower, 4, 9);
				}
				if (location.x == 10 && location.y == 51)
				{
					genericTransfer(Area.J_Inc_Building, 9, 14);
				}
				if (location.x == 50 && location.y == 41)
				{
					genericTransfer(Area.MegaMart,11,13);
				}
				break;
			case YourHouse:
			case Rival_House:
				if (location.y == 8 && direction == 270)
				{
					if (location.x == 5 || location.x == 6)
					{
						if (area == Area.YourHouse)
						{
							location.x=15;
							location.y=12;
						}
						else
						{
							location.x=27;
							location.y=18;
						}
						area=Area.Stringville;
						bgm.stop();
						createCurrentArea();
					}
				}
				break;
			case Route_4:
				if (location.x == 0 && direction == 180)
				{
					if (location.y == 88 || location.y == 89)
					{
						transition=true;
						bgm.stop();
						area=Area.Villa_Del_Joe;
						location.x=75;
						location.y-=78;
						createCurrentArea();
					}

				}
				if (location.y == 0 && direction == 90)
				{
					if (location.x >= 18 && location.x <= 21)
					{
						transition=true;
						bgm.stop();
						area=Area.Route_5;
						location.y=39;
						location.x+=4;
						createCurrentArea();
					}
				}
				if (location.x == 18 && location.y == 77)
				{
					transition=false;
					bgm.stop();
					area=Area.V_Border;
					houseInt=0;
					location.x=4;
					location.y=7;
					createCurrentArea();
				}
				if (location.y == 73 && direction == 270)
				{
					if (location.x == 18 || location.x == 19)
					{
						transition=false;
						bgm.stop();
						area=Area.V_Border;
						houseInt=0;
						location.x-=14;
						location.y=1;
						createCurrentArea();
					}
				}
				break;
			case Route_5:
				if (location.y == 39 && direction == 270)
				{
					if (location.x >= 22 && location.x <= 25)
					{
						transition=true;
						bgm.stop();
						area=Area.Route_4;
						location.x-=4;
						location.y=0;
						createCurrentArea();
					}
				}
				if (location.y == 0 && direction == 90)
				{
					if (location.x >= 60 && location.x <= 65)
					{
						transition=true;
						bgm.stop();
						area=Area.Mount_Java;
						location.x-=50;
						location.y=49;
						createCurrentArea();
					}
				}
				if (location.x == 62 && location.y == 5)
				{
					transition=false;
					bgm.stop();
					area=Area.V_Border;
					houseInt=1;
					location.x=4;
					location.y=7;
					createCurrentArea();
				}
				if (location.y == 1 && direction == 270)
				{
					if (location.x == 62 || location.x == 63)
					{
						transition=false;
						bgm.stop();
						area=Area.V_Border;
						houseInt=1;
						location.x-=58;
						location.y=1;
						createCurrentArea();
					}
				}
				if (location.x == 10 && location.y == 5)
				{
					transition=true;
					bgm.stop();
					area=Area.Class_Cave;
					location.x=9;
					location.y=22;
					createCurrentArea();
				}
				if (location.x == 32 && location.y == 3)
				{
					transition=true;
					bgm.stop();
					area=Area.Class_Cave;
					location.x=22;
					location.y=24;
					createCurrentArea();
				}
				break;
			case Class_Cave:
				if (location.x == 9 && location.y == 23)
				{
					transition=true;
					bgm.stop();
					area=Area.Route_5;
					location.x=10;
					location.y=6;
					createCurrentArea();
				}
				if (location.x == 22 && location.y == 25)
				{
					transition=true;
					bgm.stop();
					area=Area.Route_5;
					location.x=32;
					location.y=4;
					createCurrentArea();
				}
				break;
			case Mount_Java:
				if (location.y == 49 && direction == 270)
				{
					if (location.x >= 10 && location.x <= 18)
					{
						transition=true;
						bgm.stop();
						area=Area.Route_5;
						location.x+=50;
						location.y=0;
						createCurrentArea();
					}
				}
				if (location.x == 49 && direction == 0)
				{
					if (location.y == 20 || location.y == 21)
					{
						transition=true;
						bgm.stop();
						area=Area.Route_9;
						location.x=0;
						location.y-=2;
						createCurrentArea();
					}
				}
				if (location.x == 13 && location.y == 29)
				{
					pokeCenterTransfer();
				}
				if (location.x == 19 && location.y == 29)
				{
					pokeMartTransfer();
				}
				if (location.x == 42 && direction == 180)
				{
					if (location.y == 20 || location.y == 21)
					{
						transition=false;
						bgm.stop();
						area=Area.H_Border;
						houseInt=1;
						location.x=9;
						location.y-=16;
						createCurrentArea();
					}
				}
				if (location.x == 37 && direction == 0)
				{
					if (location.y == 20 || location.y == 21)
					{
						transition=false;
						bgm.stop();
						area=Area.H_Border;
						houseInt=1;
						location.x=0;
						location.y-=16;
						createCurrentArea();
					}
				}
				if (location.x == 23 && location.y == 39)
				{
					houseInt=3;
					genericTransfer(Area.Generic_3,2,7);
				}
				if (location.x == 27 && location.y == 19)
				{
					houseInt=4;
					genericTransfer(Area.Generic_3,2,7);
				}
				if (location.x == 25 && location.y == 15)
				{
					houseInt=5;
					genericTransfer(Area.Generic_3,2,7);
				}
				if (location.x == 34 && location.y == 7)
				{
					houseInt = 0;
					genericTransfer(Area.Gym_4,9,19);
				}
				if (location.x == 6 && location.y == 7)
				{
					transition=true;
					bgm.stop();
					area=Area.Java_Cave;
					location.x=15;
					location.y=22;
					createCurrentArea();
				}
				if (location.x == 16 && location.y == 11)
				{
					transition=true;
					bgm.stop();
					area=Area.Java_Cave;
					location.x=25;
					location.y=21;
					createCurrentArea();
				}
				break;
			case Java_Cave:
				if (location.x == 15 && location.y == 23)
				{
					transition=true;
					bgm.stop();
					area=Area.Mount_Java;
					location.x=6;
					location.y=8;
					createCurrentArea();
				}
				if (location.x == 25 && location.y == 22)
				{
					transition=true;
					bgm.stop();
					area=Area.Mount_Java;
					location.x=16;
					location.y=12;
					createCurrentArea();
				}
				if (location.x == 6 && location.y == 16)
				{
					transition=true;
					bgm.stop();
					area=Area.Route_7;
					location.x=36;
					location.y=4;
					createCurrentArea();
				}
				break;
			case Route_6:
				if (location.x == 59 && direction == 0)
				{
					if ((location.y >= 12 && location.y <= 15) || (location.y >= 33 && location.y <= 39))
					{
						transition=true;
						bgm.stop();
						area=Area.Streamreader_Hotel;
						location.x=0;
						createCurrentArea();
					}
				}
				if (location.y == 43 && direction == 270)
				{
					if (location.x >= 26 && location.x <= 29)
					{
						transition=true;
						bgm.stop();
						area=Area.Route_8;
						location.x+=22;
						location.y = 0;
						createCurrentArea();
					}
				}
				if (location.x == 0 && direction == 180)
				{
					if (location.y >= 33 && location.y <= 39)
					{
						transition=true;
						bgm.stop();
						area=Area.Route_ARRAYINDEXOUTOFBOUNDSEXCEPTION;
						location.x=49;
						location.y-=14;
						createCurrentArea();
					}
				}
				if (location.x == 7 && location.y == 21)
				{
					pokeCenterTransfer();
				}
				if (location.x == 8 && location.y == 9)
				{
					transition=true;
					bgm.stop();
					area=Area.Public_Cave;
					location.x=78;
					location.y=82;
					createCurrentArea();
				}
				break;
			case Streamreader_Hotel:
				if (location.x == 0 &&  direction == 180)
				{
					if ((location.y >= 12 && location.y <= 15) || (location.y >= 33 && location.y <= 39))
					{
						transition=true;
						bgm.stop();
						area=Area.Route_6;
						location.x=59;
						createCurrentArea();
					}
				}
				if (location.x == 22 && location.y == 5)
				{
					houseInt = 0;
					genericTransfer(Area.Gym_5,9,19);
				}
				if (location.x == 15 && location.y == 27)
				{
					genericTransfer(Area.Generic_4,2,7);
					houseInt = 0;
				}
				if (location.x == 33 && location.y == 29)
				{
					genericTransfer(Area.Generic_4,2,7);
					houseInt = 1;
				}
				if (location.x == 25 && location.y == 25)
				{
					pokeCenterTransfer();
				}
				if (location.x == 20 && location.y == 25)
				{
					pokeMartTransfer();
				}
				if (location.x == 23 && location.y == 25)
				{
					genericTransfer(Area.Hotel_Lobby,5,11);
				}
				break;
			case Hotel_Lobby:
				if (location.y == 11 && direction == 270)
				{
					if (location.x == 5 || location.x == 6)
					{
						genericReturn();
					}
				}
				break;
			case Route_8:
				if (location.y == 0 && direction == 90)
				{
					if (location.x >= 48 && location.x <= 51)
					{
						transition=true;
						bgm.stop();
						area=Area.Route_6;
						location.x-=22;
						location.y = 43;
						createCurrentArea();
					}
				}
				if (location.y == 63 && direction == 270)
				{
					if (location.x >= 3 && location.x <= 63 && surfing)
					{
						transition=true;
						bgm.stop();
						area=Area.Args_Harbor;
						location.y=0;
						createCurrentArea();
					}
				}
				if (location.x == 23 && location.y == 17)
				{
					houseInt=10;
					genericTransfer(Area.Generic_2, 2, 7);
				}
				if (location.x == 17 && location.y == 23)
				{
					houseInt=11;
					genericTransfer(Area.Generic_2, 2, 7);
				}
				break;
			case Route_ARRAYINDEXOUTOFBOUNDSEXCEPTION:
				if (location.x == 0 && direction == 180)
				{
					if (location.y >= 19 && location.y <= 25)
					{
						transition=true;
						bgm.stop();
						area=Area.Nested_Village;
						location.x=49;
						location.y+=18;
						createCurrentArea();
					}
				}
				if (location.x == 49 && direction == 0)
				{
					if (location.y >= 19 && location.y <= 25)
					{
						transition=true;
						bgm.stop();
						area=Area.Route_6;
						location.x=0;
						location.y+=14;
						createCurrentArea();
					}
				}
				if (location.x == 24 && location.y == 13)
				{
					transition=true;
					bgm.stop();
					area=Area.Articuno_Cave;
					location.x=10;
					location.y=16;
					createCurrentArea();
				}
				break;
			case Articuno_Cave:
				if (location.x == 10 && location.y == 17)
				{
					transition=true;
					bgm.stop();
					area=Area.Route_ARRAYINDEXOUTOFBOUNDSEXCEPTION;
					location.x=24;
					location.y=14;
					createCurrentArea();
				}
				break;
			case Route_9:
				if (location.x == 0 && direction == 180)
				{
					if (location.y == 18 || location.y == 19)
					{
						transition=true;
						bgm.stop();
						area=Area.Mount_Java;
						location.x=49;
						location.y+=2;
						createCurrentArea();
					}
				}
				if (location.y == 89 && direction == 270)
				{
					if (location.x == 14 || location.x == 15)
					{
						transition=true;
						bgm.stop();
						area=Area.Recursive_Hot_Springs;
						location.y=0;
						createCurrentArea();
					}
				}
				if (location.x == 5 && location.y == 55)
				{
					houseInt=13;
					genericTransfer(Area.Generic_3,2,7);
				}
				if (location.x == 19 && location.y == 5)
				{
					houseInt=14;
					genericTransfer(Area.Generic_3,2,7);
				}
				break;
			case Recursive_Hot_Springs:
				if (location.y == 0 && direction == 90)
				{
					if (location.x == 14 || location.x == 15)
					{
						transition=true;
						bgm.stop();
						area=Area.Route_9;
						location.y=89;
						createCurrentArea();
					}
				}
				if (location.y == 59 && direction == 270)
				{
					if (location.x >= 16 && location.x <= 21)
					{
						transition=true;
						bgm.stop();
						area=Area.Route_10;
						location.y=0;
						createCurrentArea();
					}
				}
				if (location.x == 23 && location.y == 15)
				{
					pokeMartTransfer();
				}
				if (location.x == 9 && direction == 0)
				{
					if (location.y == 50 || location.y == 51)
					{
						transition=false;
						bgm.stop();
						area=Area.H_Border;
						houseInt=2;
						location.x=0;
						location.y-=46;
						createCurrentArea();
					}
				}
				if (location.x == 14 && direction == 180)
				{
					if (location.y == 50 || location.y == 51)
					{
						transition=false;
						bgm.stop();
						area=Area.H_Border;
						houseInt=2;
						location.x=9;
						location.y-=46;
						createCurrentArea();
					}
				}
				if (location.x == 23 && direction == 0)
				{
					if (location.y == 50 || location.y == 51)
					{
						transition=false;
						bgm.stop();
						area=Area.H_Border;
						houseInt=3;
						location.x=0;
						location.y-=46;
						createCurrentArea();
					}
				}
				if (location.x == 28 && direction == 180)
				{
					if (location.y == 50 || location.y == 51)
					{
						transition=false;
						bgm.stop();
						area=Area.H_Border;
						houseInt=3;
						location.x=9;
						location.y-=46;
						createCurrentArea();
					}
				}
				if (location.x == 24 && location.y == 35)
				{
					houseInt = 0;
					genericTransfer(Area.Gym_6,9,19);
				}
				if (location.x == 13 && location.y == 15)
				{
					houseInt=6;
					genericTransfer(Area.Generic_3,2,7);
				}
				if (location.x == 13 && location.y == 19)
				{
					houseInt=7;
					genericTransfer(Area.Generic_3,2,7);
				}
				if (location.x == 23 && location.y == 21)
				{
					houseInt=8;
					genericTransfer(Area.Generic_3,2,7);
				}
				break;
			case Route_10:
				if (location.y == 0 && direction == 90)
				{
					if (location.x >= 16 && location.x <= 21)
					{
						transition=true;
						bgm.stop();
						area=Area.Recursive_Hot_Springs;
						location.y=59;
						createCurrentArea();
					}
				}
				if (location.x == 8 && location.y == 33)
				{
					transition=true;
					bgm.stop();
					area=Area.Public_Cave;
					location.x=50;
					location.y=63;
					createCurrentArea();
				}
				break;
			case Route_11:
				if (location.x == 69 && direction == 0)
				{
					if (location.y >= 6 && location.y <= 9)
					{
						transition=true;
						bgm.stop();
						area=Area.Route_3;
						location.x=0;
						location.y+=28;
						createCurrentArea();
					}
				}
				if (location.x == 0 && direction == 180)
				{
					if (location.y >= 2 && location.y <= 5)
					{
						transition=true;
						bgm.stop();
						area=Area.Enumville;
						location.x=49;
						createCurrentArea();
					}
				}
				break;
			case Enumville:
				if (location.x == 49 && direction == 0)
				{
					if (location.y >= 2 && location.y <= 5)
					{
						transition=true;
						bgm.stop();
						area=Area.Route_11;
						location.x=0;
						createCurrentArea();
					}
				}
				if (location.x == 0 && direction == 180)
				{
					if (location.y == 18 || location.y == 19)
					{
						transition=true;
						bgm.stop();
						area=Area.Route_12;
						location.y+=42;
						location.x=49;
						createCurrentArea();
					}
				}
				if (location.x == 5 && location.y == 15)
				{
					houseInt=5;
					genericTransfer(Area.Generic_2, 2, 7);
				}
				if (location.x == 31 && location.y == 15)
				{
					houseInt=6;
					genericTransfer(Area.Generic_2, 2, 7);
				}
				if (location.x == 12 && location.y == 19)
				{
					pokeCenterTransfer();
				}
				if (location.x == 18 && location.y == 19)
				{
					pokeMartTransfer();
				}
				break;
			case Route_12:
				if (location.x == 49 && direction == 0)
				{
					if (location.y == 60 || location.y == 61)
					{
						transition=true;
						bgm.stop();
						area=Area.Enumville;
						location.y-=42;
						location.x=0;
						createCurrentArea();
					}
				}
				if (location.y == 0 && direction == 90)
				{
					if (location.x == 22 || location.x == 23)
					{
						transition=true;
						bgm.stop();
						area=Area.Polymorph_Town;
						location.y=59;
						createCurrentArea();
					}
				}
				if (location.x == 0 && direction == 180)
				{
					if (location.y >= 19 && location.y <= 30)
					{
						transition=true;
						bgm.stop();
						if (VERSION.equalsIgnoreCase("Peaches"))
						area=Area.Peach_City;
						else
						area=Area.Cream_City;
						location.y-=2;
						location.x=79;
						createCurrentArea();
					}
					if (location.y == 35)
					{
						surfing=false;
						transition=true;
						bgm.stop();
						area=Area.Slipspace;
						location.y-=25;
						location.x=19;
						createCurrentArea();
					}
				}
				if (location.x == 12 && location.y == 26)
				{
					transition=true;
					bgm.stop();
					area=Area.Primal_Cave;
					location.x=10;
					location.y=16;
					createCurrentArea();
				}
				break;
			case Primal_Cave:
				if (location.x == 10 && location.y == 17)
				{
					transition=true;
					bgm.stop();
					area=Area.Route_12;
					location.x=12;
					location.y=27;
					createCurrentArea();
				}
				break;
			case Polymorph_Town:
				if (location.y == 59 && direction == 270)
				{
					if (location.x == 22 || location.x == 23)
					{
						transition=true;
						bgm.stop();
						area=Area.Route_12;
						location.y=0;
						createCurrentArea();
					}
				}
				if (location.x == 31 && location.y == 19)
				{
					pokeCenterTransfer();
				}
				if (location.x == 27 && location.y == 17)
				{
					pokeMartTransfer();
				}
				if (location.x == 31 && location.y == 29)
				{
					houseInt=7;
					genericTransfer(Area.Generic_2, 2, 7);
				}
				if (location.x == 33 && location.y == 35)
				{
					houseInt=8;
					genericTransfer(Area.Generic_2, 2, 7);
				}
				if (location.x == 15 && location.y == 37)
				{
					houseInt=9;
					genericTransfer(Area.Generic_2, 2, 7);
				}
				if (location.x == 22 && location.y == 13)
				{
					houseInt=0;
					genericTransfer(Area.Gym_7, 9, 19);
				}
				if (location.x == 27 && location.y == 53)
				{
					transition=true;
					bgm.stop();
					area=Area.Diglett_Cave;
					location.x=8;
					location.y=11;
					createCurrentArea();
				}
				break;
			case Diglett_Cave:
				if (location.x == 8 && location.y == 12)
				{
					transition=true;
					bgm.stop();
					area=Area.Polymorph_Town;
					location.x=27;
					location.y=54;
					createCurrentArea();
				}
				if (location.x == 20 && location.y == 49)
				{
					transition=true;
					bgm.stop();
					area=Area.Route_13;
					location.x=18;
					location.y=8;
					createCurrentArea();
				}
				break;
			case Binary_City:
				if (location.x == 0 && direction == 180)
				{
					if (location.y == 20 || location.y == 21)
					{
						transition=true;
						bgm.stop();
						area=Area.Route_13;
						location.x=59;
						createCurrentArea();
					}
				}
				if (location.x == 45 && location.y == 25)
				{
					pokeCenterTransfer();
				}
				if (location.x == 51 && location.y == 25)
				{
					pokeMartTransfer();
				}
				if (location.x == 59 && direction == 0)
				{
					if (location.y == 20 || location.y == 21)
					{
						transition=false;
						bgm.stop();
						area=Area.H_Border;
						houseInt=0;
						location.x=0;
						location.y-=16;
						createCurrentArea();
					}
				}
				if (location.x == 13 && location.y == 17)
				{
					houseInt=9;
					genericTransfer(Area.Generic_3,2,7);
				}
				if (location.x == 21 && location.y == 25)
				{
					houseInt=10;
					genericTransfer(Area.Generic_3,2,7);
				}
				if (location.x == 37 && location.y == 17)
				{
					houseInt=11;
					genericTransfer(Area.Generic_3,2,7);
				}
				if (location.x == 17 && location.y == 7)
				{
					houseInt=12;
					genericTransfer(Area.Generic_3,2,7);
				}
				if (location.x == 24 && location.y == 41)
				{
					houseInt=0;
					genericTransfer(Area.Gym_8, 9, 19);
				}
				break;
			case Route_13:
				if (location.x == 59 && direction == 0)
				{
					if (location.y == 20 || location.y == 21)
					{
						transition=true;
						bgm.stop();
						area=Area.Binary_City;
						location.x=0;
						createCurrentArea();
					}
				}
				if (location.x == 2 && location.y == 2 && direction == 180)
				{
					direction=0;
					transition=true;
					bgm.stop();
					area=Area.Intville;
					location.x=0;
					location.y=10;
					createCurrentArea();
				}
				if (location.x == 18 && location.y == 7)
				{
					transition=true;
					bgm.stop();
					area=Area.Diglett_Cave;
					location.x=20;
					location.y=48;
					createCurrentArea();
				}
				break;
			case Route_14:
				if (location.x == 0 && direction == 180)
				{
					if (location.y == 14 || location.y == 15)
					{
						transition=true;
						bgm.stop();
						area=Area.Args_Harbor;
						location.x=59;
						location.y+=2;
						createCurrentArea();
					}
				}
				if (location.x == 30 && location.y == 5)
				{
					genericTransfer(Area.Power_Plant,12,19);
				}
				break;
			case Power_Plant:
				if (location.y == 19 && direction == 270)
				{
					if (location.x == 12 || location.x == 13)
					{
						genericReturn();
					}
				}
				break;
			case Route_7:
				if (location.x == 3 && direction == 0)
				{
					if (location.y == 10 || location.y == 11)
					{
						transition=true;
						bgm.stop();
						area=Area.Null_Zone;
						location.x=0;
						location.y+=2;
						createCurrentArea();
					}
				}
				if (location.x == 0 && direction == 180)
				{
					if (location.y == 44 || location.y == 45)
					{
						transition=true;
						bgm.stop();
						area=Area.Champions_Walk;
						location.x=99;
						location.y-=10;
						createCurrentArea();
					}
				}
				if (location.x == 36 && location.y == 3)
				{
					transition=true;
					bgm.stop();
					area=Area.Java_Cave;
					location.x=6;
					location.y=15;
					createCurrentArea();
				}
				if (location.x == 32 && direction == 180)
				{
					if (location.y == 8 || location.y == 9)
					{
						transition=false;
						bgm.stop();
						area=Area.Rocket_Right_Tower;
						location.x=18;
						location.y-=3;
						createCurrentArea();
					}
				}
				if (location.x == 29 && location.y == 15)
				{
					transition=false;
					bgm.stop();
					area=Area.Rocket_Right_Tower;
					location.x=9;
					location.y=14;
					createCurrentArea();
				}
				if (location.x == 18 && direction == 180)
				{
					if (location.y == 18 || location.y == 19)
					{
						transition=false;
						bgm.stop();
						area=Area.Rocket_Left_Tower;
						location.x=14;
						location.y-=11;
						createCurrentArea();
					}
				}
				if (location.x == 15 && location.y == 21)
				{
					transition=false;
					bgm.stop();
					area=Area.Rocket_Left_Tower;
					location.x=8;
					location.y=15;
					createCurrentArea();
				}
				if (location.x == 24 && location.y == 19)
				{
					transition=false;
					bgm.stop();
					area=Area.Rocket_Central_Tower;
					location.x=12;
					location.y=20;
					createCurrentArea();
				}
				break;
			case Rocket_Right_Tower:
				if (location.x == 18 && direction == 0)
				{
					if (location.y == 5 || location.y == 6)
					{
						transition=false;
						bgm.stop();
						area=Area.Route_7;
						location.x=32;
						location.y+=3;
						createCurrentArea();
					}
				}
				if (location.y == 14 && direction == 270)
				{
					if (location.x == 9 || location.x == 10)
					{
						transition=false;
						bgm.stop();
						area=Area.Route_7;
						location.x=29;
						location.y=16;
						createCurrentArea();
					}
				}
				if (location.x == 17 && location.y == 11)
					location.y+=19;
				else if (location.x == 17 && location.y == 30)
					location.y-=19;
				else if (location.x == 4 && location.y == 3)
					location.y+=19;
				else if (location.x == 4 && location.y == 22)
					location.y-=19;
				break;
			case Rocket_Left_Tower:
				if (location.x == 14 && direction == 0)
				{
					if (location.y == 7 || location.y == 8)
					{
						transition=false;
						bgm.stop();
						area=Area.Route_7;
						location.x=18;
						location.y+=11;
						createCurrentArea();
					}
				}
				if (location.y == 15 && direction == 270)
				{
					if (location.x == 8 || location.x == 9)
					{
						transition=false;
						bgm.stop();
						area=Area.Route_7;
						location.x=15;
						location.y=22;
						createCurrentArea();
					}
				}
				if (location.x == 6 && location.y == 9)
					location.y+=20;
				else if (location.x == 6 && location.y == 29)
					location.y-=20;

				if (location.x == 3 && location.y == 14)
					location.y+=20;
				else if (location.x == 3 && location.y == 34)
					location.y-=20;

				if (location.x == 6 && location.y == 34)
					location.y+=19;
				else if (location.x == 6 && location.y == 53)
					location.y-=19;

				if (location.x == 13 && location.y == 34)
					location.y+=19;
				else if (location.x == 13 && location.y == 53)
					location.y-=19;

				break;
			case Rocket_Central_Tower:
				if (location.x == 5 && location.y == 5)
					location.y+=22;
				else if (location.x == 5 && location.y == 27)
					location.y-=22;
				if (location.y == 20 && direction == 270)
				{
					if (location.x == 12 || location.x == 13)
					{
						transition=false;
						bgm.stop();
						area=Area.Route_7;
						location.x=24;
						location.y=20;
						createCurrentArea();
					}
				}
				break;
			case Null_Zone:
				if (location.x == 0 && direction == 180)
				{
					if (location.y == 12 || location.y == 13)
					{
						transition=true;
						bgm.stop();
						area=Area.Route_7;
						location.x=3;
						location.y-=2;
						createCurrentArea();
					}
				}
				if (location.x == 8 && location.y == 17)
				{
					pokeMartTransfer();
				}
				break;
			case Champions_Walk:
				if (location.x == 99 && direction == 0)
				{
					if (location.y == 34 || location.y == 35)
					{
						transition=true;
						bgm.stop();
						area=Area.Route_7;
						location.x=0;
						location.y+=10;
						createCurrentArea();
					}
				}
				if (location.y == 0 && direction == 90)
				{
					if (location.x == 12 || location.x == 13)
					{
						transition=true;
						bgm.stop();
						area=Area.Victory_Road;
						location.x+=4;
						location.y=59;
						createCurrentArea();
					}
				}
				if (location.x == 50 && location.y == 19)
				{
					transition=true;
					bgm.stop();
					area=Area.Moltres_Cave;
					location.x=10;
					location.y=16;
					createCurrentArea();
				}
				if (location.x == 15 && location.y == 13)
				{
					pokeCenterTransfer();
				}
				if (location.x == 9 && location.y == 13)
				{
					pokeMartTransfer();
				}
				if (location.x == 91 && location.y == 33)
				{
					transition=false;
					bgm.stop();
					area=Area.V_Border;
					houseInt=4;
					location.x=4;
					location.y=7;
					createCurrentArea();
				}
				if (location.y == 29 && direction == 270)
				{
					if (location.x == 91 || location.x == 92)
					{
						transition=false;
						bgm.stop();
						area=Area.V_Border;
						houseInt=4;
						location.x-=87;
						location.y=1;
						createCurrentArea();
					}
				}
				break;
			case Moltres_Cave:
				if (location.x == 10 && location.y == 17)
				{
					transition=true;
					bgm.stop();
					area=Area.Champions_Walk;
					location.x=50;
					location.y=20;
					createCurrentArea();
				}
				break;
			case Victory_Road:
				if (location.y == 59 && direction == 270)
				{
					if (location.x == 16 || location.x == 17)
					{
						transition=true;
						bgm.stop();
						area=Area.Champions_Walk;
						location.x-=4;
						location.y=0;
						createCurrentArea();
					}
				}
				if (location.y == 33 && direction == 270)
				{
					if (location.x == 15 || location.x == 16)
					{
						transition=false;
						bgm.stop();
						area=Area.Victory_Road_Cave;
						location.x=35;
						location.y=16;
						createCurrentArea();
					}
				}
				if (location.x == 16 && location.y == 47)
				{
					transition=false;
					bgm.stop();
					area=Area.Victory_Road_Cave;
					location.x=15;
					location.y=82;
					createCurrentArea();
				}
				if (location.y == 19 && direction == 90)
				{
					if (location.x == 15 || location.x == 16)
					{
						transition=false;
						bgm.stop();
						area=Area.Elite_4;
						location.x+=13;
						location.y=116;
						createCurrentArea();
					}
				}
				break;
			case Elite_4:
				if (location.y == 116 && direction == 270)
				{
					if (location.x == 28 || location.x == 29)
					{
						transition=false;
						bgm.stop();
						area=Area.Victory_Road;
						location.x-=13;
						location.y=20;
						createCurrentArea();
					}
				}
				if (location.x == 38 && location.y == 101)
				{
					location.x =29;
					location.y = 96;
				}
				if (location.x == 27 || location.x == 28)
				{
					if (location.y == 77&&!trainer[0].hostile)
					location.y = 70;
					if (location.y == 51&&!trainer[1].hostile)
					location.y = 46;
					if (location.y == 26&&!trainer[2].hostile)
					location.y = 20;
					if (location.y == 3&&!trainer[3].hostile)
					{
						location.x += 22;
						location.y = 24;
					}
				}
				if (location.y == 7 && direction == 90&&objectiveComplete[10])
				{
					if (location.x == 49 || location.x == 50)
					{
						transition=false;
						bgm.stop();
						if (VERSION.equalsIgnoreCase("Peaches"))
						area=Area.Peach_City;
						else
						area=Area.Cream_City;
						location.x=49;
						location.y=30;
						createCurrentArea();
					}
				}
				break;
			case Peach_City:
			case Cream_City:
				if (location.x == 79 && direction == 0)
				{
					if (location.y >= 17 && location.y <= 28)
					{
						transition=true;
						bgm.stop();
						area=Area.Route_12;
						location.y+=2;
						location.x=0;
						createCurrentArea();
					}
				}
				if (location.x == 49 && location.y == 29)
				{
					pokeCenterTransfer();
				}
				if (location.x == 55 && location.y == 29)
				{
					pokeMartTransfer();
				}
				if (location.x == 15 && location.y == 39)
				{
					houseInt=12;
					genericTransfer(Area.Generic_1, 2, 7);
				}
				if (location.x == 27 && location.y == 39)
				{
					houseInt=13;
					genericTransfer(Area.Generic_1, 2, 7);
				}
				if (location.x == 39 && location.y == 39)
				{
					houseInt=14;
					genericTransfer(Area.Generic_1, 2, 7);
				}
				if (location.x == 51 && location.y == 39)
				{
					houseInt=15;
					genericTransfer(Area.Generic_1, 2, 7);
				}
				if (location.x == 26 && location.y == 17)
				{
					houseInt=1;
					genericTransfer(Area.Gym_1, 7, 14);
				}
				if (location.x == 34 && location.y == 17)
				{
					houseInt=1;
					genericTransfer(Area.Gym_2, 12, 14);
				}
				if (location.x == 42 && location.y == 17)
				{
					houseInt=1;
					genericTransfer(Area.Gym_3, 9, 19);
				}
				if (location.x == 50 && location.y == 17)
				{
					houseInt=1;
					genericTransfer(Area.Gym_4, 9, 19);
				}
				if (location.x == 26 && location.y == 11)
				{
					houseInt=1;
					genericTransfer(Area.Gym_5, 9, 19);
				}
				if (location.x == 34 && location.y == 11)
				{
					houseInt=1;
					genericTransfer(Area.Gym_6, 9, 19);
				}
				if (location.x == 42 && location.y == 11)
				{
					houseInt=1;
					genericTransfer(Area.Gym_7, 9, 19);
				}
				if (location.x == 50 && location.y == 11)
				{
					houseInt=1;
					genericTransfer(Area.Gym_8, 9, 19);
				}
				if (location.y == 23 && direction == 90)
				{
					if (location.x == 13 || location.x == 14)
					{
						genericTransfer(Area.Battle_Tower,location.x-6,14);
					}
				}
				break;
			case Battle_Tower:
				if (location.y == 14 && direction == 270)
				{
					if (location.x == 7 || location.x == 8)
					{
						genericReturn();
					}
				}
				break;
			case Babbs_Lab:
				if (location.y == 12 && direction == 270)
				{
					if (location.x == 4 || location.x == 5)
					{
						area=Area.Stringville;
						location.x=32;
						location.y=10;
						bgm.stop();
						createCurrentArea();
					}
				}
				break;
			case Generic_1:
				if (location.y == 7 && direction == 270)
				{
					if (location.x == 2 || location.x == 3)
					{
						transition=false;
						bgm.stop();
						area=returnArea;
						location.x=returnPoint.x;
						location.y=returnPoint.y;
						createCurrentArea();
					}
				}
				break;
			case Gym_1:
				if (location.y == 14 && direction == 270)
				{
					if (location.x == 7 || location.x == 8)
					{
						genericReturn();
					}
				}
				break;
			case Gym_2:
				if (location.y == 14 && direction == 270)
				{
					if (location.x == 12 || location.x == 13)
					{
						genericReturn();
					}
				}
				if (location.x == 5 && location.y == 7 && direction == 90)
				{
					location.x=19;
					location.y=5;
					direction=180;
				}
				if (location.x == 19 && location.y == 5 && direction == 0)
				{
					location.x=5;
					location.y=7;
				}
				break;
			case Intville:
				if (location.x == 0 && direction == 180)
				{
					if (location.y == 10 || location.y == 11)
					{
						direction=0;
						transition=true;
						bgm.stop();
						area=Area.Route_13;
						location.x=2;
						location.y=2;
						createCurrentArea();
					}
				}
				if (location.x == 19 && location.y == 23)
				{
					genericTransfer(Area.Generic_2,2,7);
					houseInt = 9001;
				}
				break;
			case H_Border:
				if (location.x == 9 && direction == 0)
				{
					if (location.y == 4 || location.y == 5)
					{
						transition=true;
						bgm.stop();
						if (houseInt == 0)
						{
							area=Area.Route_1;
							location.x=4;
							location.y+=16;
						}
						else if (houseInt == 1)
						{
							transition = false;
							area=Area.Mount_Java;
							location.x=42;
							location.y+=16;
						}
						else if (houseInt == 2)
						{
							transition = false;
							area=Area.Recursive_Hot_Springs;
							location.x=14;
							location.y+=46;
						}
						else if (houseInt == 3)
						{
							transition = false;
							area=Area.Recursive_Hot_Springs;
							location.x=28;
							location.y+=46;
						}
						createCurrentArea();
					}
				}
				if (location.x == 0 && direction == 180)
				{
					if (location.y == 4 || location.y == 5)
					{
						transition=true;
						bgm.stop();
						if (houseInt == 0)
						{
							area=Area.Binary_City;
							location.x=59;
							location.y+=16;
						}
						else if (houseInt == 1)
						{
							transition = false;
							area=Area.Mount_Java;
							location.x=37;
							location.y+=16;
						}
						else if (houseInt == 2)
						{
							transition = false;
							area=Area.Recursive_Hot_Springs;
							location.x=9;
							location.y+=46;
						}
						else if (houseInt == 3)
						{
							transition = false;
							area=Area.Recursive_Hot_Springs;
							location.x=23;
							location.y+=46;
						}
						createCurrentArea();
					}
				}
				break;
			case V_Border:
				if (location.y == 0 && direction == 90)
				{
					if (location.x == 4 || location.x == 5)
					{
						transition=true;
						bgm.stop();
						if (houseInt == 0)
						{
							if(Inventory.hasItem(new Item(Item.Type.BICYCLE,1)))
							{
								transition=false;
								area=Area.Route_4;
								location.x+=14;
								location.y=73;
							}
							else
							{
								transition=false;
								direction=270;
								location.y++;
							}
						}
						else if (houseInt == 1)
						{
							transition=false;
							area=Area.Route_5;
							location.x+=58;
							location.y=1;
						}
						else if (houseInt == 2)
						{
							transition=true;
							area=Area.Hexadecimal_Forest;
							location.x+=12;
							location.y=39;
						}
						else if (houseInt == 3)
						{
							transition=false;
							area=Area.Route_2;
							location.x+=21;
							location.y=15;
						}
						else if (houseInt == 4)
						{
							transition=false;
							area=Area.Champions_Walk;
							location.x+=87;
							location.y=29;
						}

						createCurrentArea();
					}
				}
				if (location.y == 7 && direction == 270)
				{
					if (location.x == 4 || location.x == 5)
					{
						transition=true;
						bgm.stop();
						if (houseInt == 0)
						{
							transition=false;
							area=Area.Route_4;
							location.x=18;
							location.y=78;
						}
						else if (houseInt == 1)
						{
							transition=false;
							area=Area.Route_5;
							location.x=62;
							location.y=6;
						}
						else if (houseInt == 2)
						{
							transition=false;
							area=Area.Route_2;
							location.x=25;
							location.y=30;
						}
						else if (houseInt == 3)
						{
							transition=true;
							area=Area.Hexadecimal_Forest;
							location.x+=16;
							location.y=0;
						}
						else if (houseInt == 4)
						{
							transition=false;
							area=Area.Champions_Walk;
							location.x=91;
							location.y=34;
						}
						createCurrentArea();
					}
				}
				break;
			case Slipspace:
				if (location.x == 19 && direction == 0)
				{
					if (location.y >= 6 && location.y <= 10)
					{
						surfing=true;
						transition=true;
						bgm.stop();
						area=Area.Route_12;
						location.y+=25;
						location.x=0;
						createCurrentArea();
					}
				}
				break;
			case Hexadecimal_Forest:
				if (location.y == 39 && direction == 270)
				{
					if (location.x == 16 || location.x == 17)
					{
						transition=false;
						houseInt=2;
						bgm.stop();
						area=Area.V_Border;
						location.y=1;
						location.x-=12;
						createCurrentArea();
					}
				}
				if (location.y == 0 && direction == 90)
				{
					if (location.x == 20 || location.x == 21)
					{
						transition=false;
						houseInt=3;
						bgm.stop();
						area=Area.V_Border;
						location.y=7;
						location.x-=16;
						createCurrentArea();
					}
				}
				break;
			case Generic_2:
			case Generic_3:
				if (location.y == 7 && direction == 270)
				{
					if (location.x == 2 || location.x == 3)
					{
						genericReturn();
					}
				}
				break;
			case Gym_8:
				if (location.x == 13 && location.y == 18)
					location.x--;
			case Gym_7:
			case Gym_3:
			case Gym_4:
			case Gym_5:
			case Gym_6:
				if (location.y == 19 && direction == 270)
				{
					if (location.x == 9 || location.x == 10)
					genericReturn();
				}
				break;
			case J_Inc_Radio_Tower:
				if (location.y == 9 && direction == 270)
				{
					if (location.x == 4 || location.x == 5)
					{
						genericReturn();
					}
				}
				break;
			case J_Inc_Building:
				if (location.y == 14 && direction == 270)
				{
					if (location.x == 9 || location.x == 10)
					{
						genericReturn();
					}
				}
				if (location.x == 13 && location.y == 5 && direction == 90)
				{
					direction = 270;
					location.y = 22;
				}
				if (location.x == 13 && location.y == 21 && direction == 90)
				{
					direction = 270;
					location.y = 6;
				}
				if (location.x == 15 && location.y == 21 && direction == 90)
				{
					direction = 270;
					location.y = 38;
				}
				if (location.x == 15 && location.y == 37 && direction == 90)
				{
					direction = 270;
					location.y = 22;
				}
				break;
			case Victory_Road_Cave:
				if (location.x == 89 && location.y == 59)
				{
					transition=true;
					bgm.stop();
					area=Area.Mountain_Dew_Paradise;
					location.x=0;
					location.y=9;
					createCurrentArea();
				}
				if (location.x == 15 && location.y == 83)
				{
					transition=false;
					bgm.stop();
					area=Area.Victory_Road;
					location.x=16;
					location.y=48;
					createCurrentArea();
				}
				if (location.x == 35 && location.y == 15)
				{
					transition=false;
					bgm.stop();
					area=Area.Victory_Road;
					location.x=15;
					location.y=33;
					createCurrentArea();
				}
				break;
			case Mountain_Dew_Paradise:
				if (location.x == 0 && location.y == 9)
				{
					transition=true;
					bgm.stop();
					area=Area.Victory_Road_Cave;
					location.x=89;
					location.y=59;
					createCurrentArea();
				}
				break;
			case Generic_4:
				if (location.y == 7 && direction == 270)
				{
					if (location.x == 2 || location.x == 3)
					{
						genericReturn();
					}
				}
				if (location.x == 7 && location.y == 7)
				{
					area=Area.Generic_5;
					createCurrentArea();
					direction = 180;
				}
				break;
			case Generic_5:
				if (location.x == 7 && location.y == 7)
				{
					area=Area.Generic_4;
					createCurrentArea();
					direction = 180;
				}
				if (location.x == 0 && location.y == 7)
				{
					area=Area.Generic_6;
					createCurrentArea();
					direction = 0;
				}
				break;
			case Generic_6:
				if (location.x == 0 && location.y == 7)
				{
					area=Area.Generic_5;
					createCurrentArea();
					direction = 0;
				}
				break;
			case Lighthouse:
				if (location.y == 11 && direction == 270)
				{
					bgm.stop();
					if (location.x == 5 || location.x == 6)
					{
						genericReturn();
					}
				}
			case Lighthouse_F2:
				if (location.x == 10 && location.y == 2)
				{
					bgm.stop();
					if (area == Area.Lighthouse)
						area = Area.Lighthouse_F2;
					else
						area = Area.Lighthouse;

					direction = 180;
					createCurrentArea();
				}
				break;
			case MegaMart:
				if (location.y == 13 && direction == 270)
				{
					if (location.x == 11 || location.x == 12)
					{
						genericReturn();
					}
				}
				if (location.x == 18 && location.y == 4)
				{
					location.y+=17;
					direction=270;
				}
				else if (location.x == 18 && location.y == 20)
				{
					location.y-=15;
					direction=270;
				}
				else if (location.x == 16 && location.y == 20)
				{
					location.y+=18;
					direction=270;
				}
				else if (location.x == 16 && location.y == 37)
				{
					location.y-=16;
					direction=270;
				}
				else if (location.x == 18 && location.y == 37)
				{
					location.y+=18;
					direction=270;
				}
				else if (location.x == 18 && location.y == 54)
				{
					location.y-=16;
					direction=270;
				}
				break;
			case Challenge_Cave:
				if (location.x == 112 && location.y == 111)
				{
					location.x=101;
					location.y=112;
				}
				else if(location.x == 101 && location.y == 112)
				{
					location.x=112;
					location.y=111;
				}
				if (location.x == 112 && location.y == 116)
				{
					transition=true;
					bgm.stop();
					area=Area.Args_Harbor;
					location.x=50;
					location.y=58;
					createCurrentArea();
				}
				break;

		}
	}