this is the code i have worked together so far and im not sure where to go from here tbh as im not sure how classes work and how to use coordinate tracking with 2d arrays
so if any tutorials that teach 2d array coordinate tracking would be useful or any kind of useful articleds or just help 🙂 would be appreciated
public static void door13Puzzle()
{
//int locationy;
//int locationx;
string[,] map =
{
{ "┌", "─", "─", "─", "─", "─", "─", "─", "─", "┐"},
{ "│", "x", "0", "0", "0", "0", "0", "0", "0", "│"},
{ "│", "x", "0", "x", "x", "x", "x", "x", "0", "│"},
{ "│", "o", "0", "x", "0", "0", "0", "x", "0", "│"},
{ "│", "x", "x", "x", "0", "x", "0", "x", "0", "│"},
{ "│", "x", "x", "x", "0", "x", "0", "x", "0", "│"},
{ "│", "█", "0", "0", "0", "x", "0", "0", "0", "│"},
{ "└", "─", "─", "─", "─", "─", "─", "─", "─", "┘"}
};
Console.Clear();
Console.WriteLine("You look around the room and create a mental image of the puzzle.\n");
Thread.Sleep(2000);
Console.Clear();
Console.WriteLine("\n");
for (int i = 0; i < map.GetLength(0); i++)
{
for (int j = 0; j < map.GetLength(1); j++)
{
Console.Write(map[i, j]);
}
Console.WriteLine();
}
}
public static void door13Puzzle()
{
//int locationy;
//int locationx;
string[,] map =
{
{ "┌", "─", "─", "─", "─", "─", "─", "─", "─", "┐"},
{ "│", "x", "0", "0", "0", "0", "0", "0", "0", "│"},
{ "│", "x", "0", "x", "x", "x", "x", "x", "0", "│"},
{ "│", "o", "0", "x", "0", "0", "0", "x", "0", "│"},
{ "│", "x", "x", "x", "0", "x", "0", "x", "0", "│"},
{ "│", "x", "x", "x", "0", "x", "0", "x", "0", "│"},
{ "│", "█", "0", "0", "0", "x", "0", "0", "0", "│"},
{ "└", "─", "─", "─", "─", "─", "─", "─", "─", "┘"}
};
Console.Clear();
Console.WriteLine("You look around the room and create a mental image of the puzzle.\n");
Thread.Sleep(2000);
Console.Clear();
Console.WriteLine("\n");
for (int i = 0; i < map.GetLength(0); i++)
{
for (int j = 0; j < map.GetLength(1); j++)
{
Console.Write(map[i, j]);
}
Console.WriteLine();
}
}