I wanted to know if there was an easier or faster method for what I'm doing. The map is not linear which is why I thought of making the variables all different. And I want the map to show the room only if the player has been there. So maybe they could go all left and miss all of the rooms from 8-12, but go to rooms 8,13, and 14. Does anyone know any method for this?
Not all code is included but this is the gist of it.
int MapF101 = 1;
int MapF102 = 0;
int MapF103 = 0;
int MapF104 = 0;
int MapF105 = 0;
int MapF106 = 0;
int MapF107 = 0;
int MapF108 = 0;
int MapF109 = 0;
int MapF110 = 0;
int MapF111 = 0;
int MapF112 = 0;
int MapF113 = 0;
int MapF114 = 0;
int MapF115 = 0;
if (command == "Forward")
{
if (room <= 15 && floor == 1)
{
Console.WriteLine("Where are you trying to go?");
}
else if (room <= 27 && floor == 2)
{
Console.WriteLine("Where are you trying to go?");
}
else
{
if (room == 1 && floor == 1 && Direction == 1)
{
room = 2;
MapF102 = 1;
}
else
{
Console.WriteLine("You ran into a wall");
}
}
goto wannado;
}
if (command == "Map")
{
if (MapF101 == 1)
{
Console.WriteLine("#####/n# #/n#####");
}
if (MapF102 == 1)
{
Console.WriteLine("#####/n# #/n#####");
}
goto wannado;
}