After analyzing a snippet of code from this link (the C# portion), I tried doing this on my own for some practice.
However, I'm confused about how the portion below translates to an X,Y index in the string list, and why the if() statement has the Y index before the X.
if (Map[playerY][playerX] == ' ')
Here's what the list looks like:
List<string> Map = new List<string>()
{
"##########",
"# #",
"# > #",
"# > #",
"# #",
"##########"
};
Any help would be appreciated, thank you in advance!