public static void Look(GameData.Room room) { room = AvatarCurrentLocation; Console.Write(room._information + Environment.NewLine); if (room._roomInventory.Count != 0) { Console.Write("You see..." + Environment.NewLine); foreach (var item in room._roomInventory) { Console.WriteLine("a/an " + item.name); } } else { Console.WriteLine("There's nothing to find in this place."); } }
public static void CheckNonFightCases(string[] input) { _words = input; switch (_words[0]) { case "h": case "help": Help(); break; case "l": case "look": Look(AvatarCurrentLocation); break; case "t": case "take": Take(_words[1]); break; case "d": case "drop": //Drop(_words[1]); break; case "n": case "north": if (AvatarCurrentLocation.north != null) { AvatarCurrentLocation = AvatarCurrentLocation.north; EnemyChangeRoom(); Look(AvatarCurrentLocation); } else { Console.WriteLine("What to do?! There's a dead end..."); } break; case "e": case "east": if (AvatarCurrentLocation.east != null) { AvatarCurrentLocation = AvatarCurrentLocation.east; EnemyChangeRoom(); Look(AvatarCurrentLocation); } else { Console.WriteLine("What to do?! There's a dead end..."); } break; case "s": case "south": if (AvatarCurrentLocation.south != null) { AvatarCurrentLocation = AvatarCurrentLocation.south; EnemyChangeRoom(); Look(AvatarCurrentLocation); } else { Console.WriteLine("What to do?! There's a dead end..."); } break; case "w": case "west": if (AvatarCurrentLocation.west != null) { AvatarCurrentLocation = AvatarCurrentLocation.west; EnemyChangeRoom(); Look(AvatarCurrentLocation.west); } else { Console.WriteLine("What to do?! There's a dead end..."); } break; default: Console.WriteLine("Oh Lord... You used some invalid input. Take another shot!"); break; } }