public static string[,] layer1 = {
{"W","W","W","W","W","W","W","W","W","W","W"},
{"S","-","-","-","-","-","W","-","D","-","W"},
{"W","W","W","W","W","-","W","-","W","-","W"},
{"W","-","-","-","W","-","-","-","W","-","W"},
{"W","W","W","-","W","W","W","-","W","-","W"},
{"W","-","W","-","-","-","W","-","W","-","W"},
{"W","-","W","W","W","-","W","-","W","B","W"},
{"W","-","-","-","W","-","W","K","W","-","W"},
{"W","-","W","W","W","-","W","W","W","-","W"},
{"W","-","-","-","-","-","-","-","-","-","E"},
{"W","W","W","W","W","W","W","W","W","W","W"}};
public static string[,] layer2 = {
{"W","W","W","W","W","W","W","W","W","E","W"},
{"W","-","-","-","-","-","-","-","W","-","W"},
{"W","-","W","W","W","-","W","-","W","-","W"},
{"W","-","W","-","-","-","W","-","-","-","W"},
{"W","W","W","-","W","W","W","W","W","W","W"},
{"S","-","W","-","-","-","-","-","-","-","W"},
{"W","-","W","W","W","W","W","W","W","-","W"},
{"W","-","-","-","-","-","W","-","-","-","W"},
{"W","W","W","W","W","-","W","-","W","-","W"},
{"W","-","-","-","-","-","-","-","W","-","W"},
{"W","W","W","W","W","W","W","W","W","W","W"}};
public static void playerChecks(string[,] layer1, string[,] layer2,bool doorOpen1, bool collectedKey1, bool bossIsDead1, bool layer1Complete, string[,] currentLayer)
if (collectedKey1 == true)
if (collectedKey1 == true)
public static void displayLayer(int playerX1, int playerY1, string[,] currentLayer)
currentLayer[playerX1, playerY1] = "O";
for (int i = 0; i < layer1.GetLength(0); i++)
for (int x = 0; x < layer1.GetLength(1); x++)
Console.Write(layer1[i, x]);
public static void Main()
{"W","W","W","W","W","W","W","W","W","W","W"},
{"S","-","-","-","-","-","W","-","D","-","W"},
{"W","W","W","W","W","-","W","-","W","-","W"},
{"W","-","-","-","W","-","-","-","W","-","W"},
{"W","W","W","-","W","W","W","-","W","-","W"},
{"W","-","W","-","-","-","W","-","-","-","W"},
{"W","-","W","W","W","-","W","-","W","B","W"},
{"W","-","-","-","W","-","W","K","W","-","W"},
{"W","-","W","W","W","-","W","W","W","-","W"},
{"W","-","-","-","-","-","-","-","-","-","E"},
{"W","W","W","W","W","W","W","W","W","W","W"}};
{"W","W","W","W","W","W","W","W","W","E","W"},
{"W","-","-","-","-","-","-","-","W","-","W"},
{"W","-","W","W","W","-","W","-","W","-","W"},
{"W","-","W","-","-","-","W","-","-","-","W"},
{"W","W","W","-","W","W","W","W","W","W","W"},
{"S","-","W","-","-","-","-","-","-","-","W"},
{"W","-","W","W","W","W","W","W","W","-","W"},
{"W","-","-","-","-","-","W","-","-","-","W"},
{"W","W","W","W","W","-","W","-","W","-","W"},
{"W","-","-","-","-","-","-","-","W","-","W"},
{"W","W","W","W","W","W","W","W","W","W","W"}};
bool layer1Complete = false;
bool layer2Complete = false;
bool collectedKey = false;
string[,] currentLayer = layer1;
displayLayer(playerX, playerY, currentLayer);
playerChecks(layer1, layer2, doorOpen, collectedKey,bossIsDead, layer1Complete, currentLayer);
Console.WriteLine("Enter (or ? for help.): ");
string input = Console.ReadLine().ToLower();
if (layer1[playerX - 1, playerY] != "W")
Console.WriteLine("That is a wall you melt.");
if (layer1[playerX + 1, playerY] != "W")
if (layer1[playerX + 1, playerY] == "K")
Console.WriteLine("You have collected the key.");
else if (layer1[playerX + 1, playerY] == "B")
if (inventory[0] == "sword")
Console.WriteLine("You killed the boss!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
Console.WriteLine("You brutally died lol.");
Console.WriteLine("That is a wall you melt.");
if (layer1[playerX, playerY - 1] != "W")
Console.WriteLine("That is a wall you melt.");
if (layer1[playerX, playerY + 1] != "W")
if (layer1[playerX, playerY + 1] == "D" && inventory[0] == "key")
Console.WriteLine("You have unlocked the door.");
else if (layer1[playerX, playerY + 1] == "D" && inventory[0] != "key")
Console.WriteLine("The door is locked and you haven't equipped the key.");
else if (layer1[playerX, playerY + 1] == "D" && inventory[1] != "key")
Console.WriteLine("Door Opened");
else if (layer1[playerX, playerY + 1] == "E")
Console.WriteLine("You have moved onto the next layer!");
Console.WriteLine("That is a wall you melt.");
Console.WriteLine("w,a,s,d are movement.");
Console.WriteLine("i is for inventory.");
Console.WriteLine("in the dungeon, K is key, D is door, B is boss.");
Console.WriteLine(inventory[0] + ", " + inventory[1] + ", " + inventory[2] + ".");
Console.WriteLine(inventory[0] + ", " + inventory[1] + ", " + inventory[2] + ".");
Console.WriteLine("What would you like to equip? 1, 2, 3: ");
int equip = Convert.ToInt32(Console.ReadLine());
Console.WriteLine(inventory[0] + " is already equipped.");
string prevEquipped2 = inventory[0];
inventory[0] = inventory[1];
inventory[1] = prevEquipped2;
Console.WriteLine(inventory[0] + " has been equipped from " + prevEquipped2);
string prevEquipped3 = inventory[0];
inventory[0] = inventory[2];
inventory[2] = prevEquipped3;
Console.WriteLine(inventory[0] + " has been equipped from " + prevEquipped3);
Console.WriteLine("You cant switch to a non existent slot you knobhead");
Console.WriteLine("That is not a recognised command.");
while (layer1Complete == false);
while(layer2Complete == false && layer1Complete == true && dead == false)
displayLayer(playerX, playerY, currentLayer);
playerChecks(layer1, layer2, doorOpen, collectedKey,bossIsDead, layer1Complete, currentLayer);
Console.WriteLine("Enter (or ? for help.): ");
string input = Console.ReadLine().ToLower();
if (layer2[playerX - 1, playerY] != "W")
Console.WriteLine("That is a wall you melt.");
if (layer2[playerX + 1, playerY] != "W")
if (layer2[playerX + 1, playerY] == "K")
Console.WriteLine("You have collected the key.");
else if (layer2[playerX + 1, playerY] == "B")
if (inventory[0] == "sword")
Console.WriteLine("You killed the boss!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
Console.WriteLine("You brutally died lol.");
Console.WriteLine("That is a wall you melt.");
if (layer2[playerX, playerY - 1] != "W")
Console.WriteLine("That is a wall you melt.");
if (layer2[playerX, playerY + 1] != "W")
if (layer2[playerX, playerY + 1] == "D" && inventory[0] == "key")
Console.WriteLine("You have unlocked the door.");
else if (layer2[playerX, playerY + 1] == "D" && inventory[0] != "key")
Console.WriteLine("The door is locked and you haven't equipped the key.");
else if (layer2[playerX, playerY + 1] == "D" && inventory[1] != "key")
Console.WriteLine("Door Opened");
else if (layer2[playerX, playerY + 1] == "E")
Console.WriteLine("You have beat the game well done!");
Console.WriteLine("That is a wall you melt.");
Console.WriteLine("w,a,s,d are movement.");
Console.WriteLine("i is for inventory.");
Console.WriteLine("in the dungeon, K is key, D is door, B is boss.");
Console.WriteLine(inventory[0] + ", " + inventory[1] + ", " + inventory[2] + ".");
Console.WriteLine(inventory[0] + ", " + inventory[1] + ", " + inventory[2] + ".");
Console.WriteLine("What would you like to equip? 1, 2, 3: ");
int equip = Convert.ToInt32(Console.ReadLine());
if(equip == 1 || equip == 2 || equip == 3)
Console.WriteLine(inventory[0] + " is already equipped.");
string prevEquipped2 = inventory[0];
inventory[0] = inventory[1];
inventory[1] = prevEquipped2;
Console.WriteLine(inventory[0] + " has been equipped from " + prevEquipped2);
string prevEquipped3 = inventory[0];
inventory[0] = inventory[2];
inventory[2] = prevEquipped3;
Console.WriteLine(inventory[0] + " has been equipped from " + prevEquipped3);
Console.WriteLine("cant do that u fricking knobead");
Console.WriteLine("That is not a recognised command.");
if (layer2[playerX, playerY] == "E")
Console.WriteLine("You have beat the game.");