public class TextAdventure
private string typedCommand;
private Room currentRoom;
public static void Main()
TextAdventure newGame = new TextAdventure();
newGame.allRooms = new Room[]{
new Room(0,"","",new int[] {0,0,0,0})
Console.WriteLine(@" ____ __ ____ _______ __ ______ ______ .___ ___. _______ .___________. ______ ");
Console.WriteLine(@" \ \ / \ / / | ____|| | / | / __ \ | \/ | | ____| | | / __ \ ");
Console.WriteLine(@" \ \/ \/ / | |__ | | | ,----'| | | | | \ / | | |__ `---| |----`| | | | ");
Console.WriteLine(@" \ / | __| | | | | | | | | | |\/| | | __| | | | | | | ");
Console.WriteLine(@" \ /\ / | |____ | `----.| `----.| `--' | | | | | | |____ | | | `--' | ");
Console.WriteLine(@" \__/ \__/ |_______||_______| \______| \______/ |__| |__| |_______| |__| \______/ ");
Console.WriteLine(@" ___ ___ ___ __ _______..______ ___ ______ _______ _______ _______. ______ ___ .______ _______ ");
Console.WriteLine(@"|__ \ / _ \ / _ \ / / / || _ \ / \ / || ____| | ____| / | / | / \ | _ \ | ____|");
Console.WriteLine(@" ) | | | | | | | | | / /_ | (----`| |_) | / ^ \ | ,----'| |__ | |__ | (----`| ,----' / ^ \ | |_) | | |__ ");
Console.WriteLine(@" / / | | | | | | | | | '_ \ \ \ | ___/ / /_\ \ | | | __| | __| \ \ | | / /_\ \ | ___/ | __| ");
Console.WriteLine(@" / /_ | |_| | | |_| | | (_) | .----) | | | / _____ \ | `----.| |____ | |____.----) | | `----./ _____ \ | | | |____ ");
Console.WriteLine(@"|____| \___/ \___/ \___/ |_______/ | _| /__/ \__\ \______||_______| |_______|_______/ \______/__/ \__\ | _| |_______|");
Console.WriteLine("You awake to a searing heat envelopping you. You're on fire!!");
Console.WriteLine("You stumble off to the east to extinguish the blaze. However, you have lost your way and cant get back. you continue on going east");
Console.WriteLine("Type Restart to begin again");
currentRoom = allRooms[0];
typedCommand = Console.ReadLine();
typedCommand = typedCommand.ToLower();
checkCommand(typedCommand);
public void checkCommand(string Command){
if(typedCommand.Equals("restart")){
Console.WriteLine("Thank you for playing Space Escape");
if(typedCommand.Equals("go east") || typedCommand.Equals("east")){
if(currentRoom.navigationArray[0]!=0){
Console.WriteLine("You head East");
currentRoom = allRooms[currentRoom.navigationArray[0]];
Console.WriteLine("You arive at "+ currentRoom.roomName);
Console.WriteLine(currentRoom.roomIntro);
Console.WriteLine("You cannot go East");
if(typedCommand.Equals("go west") || typedCommand.Equals("west")){
if(currentRoom.navigationArray[0]!=0){
Console.WriteLine("You head West");
currentRoom = allRooms[currentRoom.navigationArray[0]];
Console.WriteLine("You arive at "+ currentRoom.roomName);
Console.WriteLine(currentRoom.roomIntro);
Console.WriteLine("You cannot go west");
if(typedCommand.Equals("go south") || typedCommand.Equals("south")){
if(currentRoom.navigationArray[0]!=0){
Console.WriteLine("You head South");
currentRoom = allRooms[currentRoom.navigationArray[0]];
Console.WriteLine("You arive at "+ currentRoom.roomName);
Console.WriteLine(currentRoom.roomIntro);
Console.WriteLine("You cannot go South");
if(typedCommand.Equals("go north") || typedCommand.Equals("north")){
if(currentRoom.navigationArray[0]!=0){
Console.WriteLine("You head North");
currentRoom = allRooms[currentRoom.navigationArray[2]];
Console.WriteLine("You arive at "+ currentRoom.roomName);
Console.WriteLine(currentRoom.roomIntro);
Console.WriteLine("You cannot go North");
Console.WriteLine("You've not commanded somthing I understand");
public int[] navigationArray;
public Room(int _ID, string _RName, string _rIntro, int[] _setupArray)
navigationArray = _setupArray;