static void Main(string[] args) { GameEngine.Initialize(); _player.CurrentLocation = World.LocationByID(World.LOCATION_ID_HOME); InventoryItem sword = new InventoryItem(World.ItemByID(World.ITEM_ID_RUSTY_SWORD), 1); _player.Inventory.Add(sword); InventoryItem aPass = new InventoryItem(World.ItemByID(World.ITEM_ID_ADVENTURER_PASS), 1); _player.Inventory.Add(aPass); while (true) { Console.Write(">"); string userInput = Console.ReadLine(); if (string.IsNullOrWhiteSpace(userInput)) { continue; } string cleanedInput = userInput.ToLower(); if (cleanedInput == "exit") { break; } ParseInput(cleanedInput); } //while } //main
static void Main(string[] args) { GameEngine.Initialize(); _player.MoveTo(World.LocationByID(World.LOCATION_ID_HOME)); InventoryItem sword = new InventoryItem(World.ItemByID(World.ITEM_ID_RUSTY_SWORD), 1); InventoryItem club = new InventoryItem(World.ItemByID(World.ITEM_ID_CLUB), 1); _player.Inventory.Add(sword); //_player.Inventory.Add(club); while (true) { Console.Write("> "); string userInput = Console.ReadLine(); if (string.IsNullOrWhiteSpace(userInput)) { continue; } string cleanedInput = userInput.ToLower(); if (cleanedInput == "exit") { break; } ParseInput(cleanedInput); } }
static void Main(string[] args) { GameEngine.Initialize(); _player.Name = "Fred the Fearless"; Console.ReadLine(); }