i cant seem to get the exit condition right for this
The code for moving and spacing the Array
List<string> route = new List<string>() { "Bmiddle", "Middle", "Tmiddle", "TRight", "Right", "Middle", "Left", "Bleft", "Middle", "Left" };
// this is the correct way the player should follow to be able to exit
List<string> Currentroute = new List<string>();
// each time the player is at a spot it should add it to this list in order to meet the exit condition
string[,] arrayLab = new string[3, 3] { {"Tleft", "TMiddle", "TRight"}, /*0 */
{"Left", "Middle", "Right"}, /*1 */
{"Bleft", "Bmiddle", "Bright"} }; /*2 */
do
{
// here is supposed to be all the controls and spacing to make it look like the array. and the logic
}
while (Currentroute != route)
//The Current route must match the Route in order to meet this exit
}
}
My attempt at solving
i cant seem to add the postion the player is in to the Currentroute list in order to be able to get out,
int a = playerY;
int b = playerX;
foreach (char i in arrayLab[b, a])
{
Currentroute.Add(i.ToString());
Console.WriteLine(i);
}
i tried this but it just spells the position char for char and doesnt save it
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…