public static void Main() { #region ItemInitializationAndCrafting //initialize item atributes smallStone.name = "small stone"; smallStone.forageable = true; plantFiber.name = "Plant Fiber"; plantFiber.forageable = true; rope.name = "Rope"; stone.name = "stone"; stone.type = 10; stick.name = "stick"; stick.forageable = true; snow.name = "snow"; snowball.name = "snowball"; snowball.forageable = true; stoneAxeHead.name = "Stone Axe Head"; axeHandle.name = "Axe Handle"; stoneAxe.name = "Stone Axe"; stoneAxe.type = 1; wood.name = "wood"; wood.type = 10; wood.cuttable = true; woodPlank.name = "Wooden Plank"; woodPlank.type = 10; sand.name = "sand"; sand.forageable = true; sandstone.name = "sandstone"; sandstone.type = 10; cactus.name = "cactus"; cactus.forageable = false; cactus.cuttable = true; //crafting craftableGameItems = new List <item>(); woodPlank.craftingIngredients = new List <item>(); woodPlank.craftingIngredients.Add(wood); woodPlank.craftingQuantity = 4; craftableGameItems.Add(woodPlank); rope.craftingIngredients = new List <item>(); rope.craftingIngredients.Add(plantFiber); rope.craftingIngredients.Add(plantFiber); rope.craftingQuantity = 1; craftableGameItems.Add(rope); stoneAxeHead.craftingIngredients = new List <item>(); stoneAxeHead.craftingIngredients.Add(stone); stoneAxeHead.craftingIngredients.Add(stone); stoneAxeHead.craftingIngredients.Add(stone); stoneAxeHead.craftingQuantity = 1; craftableGameItems.Add(stoneAxeHead); axeHandle.craftingIngredients = new List <item>(); axeHandle.craftingIngredients.Add(stick); axeHandle.craftingIngredients.Add(stick); axeHandle.craftingIngredients.Add(plantFiber); axeHandle.craftingQuantity = 1; craftableGameItems.Add(axeHandle); stoneAxe.craftingIngredients = new List <item>(); stoneAxe.craftingIngredients.Add(stoneAxeHead); stoneAxe.craftingIngredients.Add(axeHandle); stoneAxe.craftingIngredients.Add(rope); stoneAxe.craftingQuantity = 1; craftableGameItems.Add(stoneAxe); snow.craftingIngredients = new List <item>(); snow.craftingIngredients.Add(snowball); snow.craftingIngredients.Add(snowball); snow.craftingIngredients.Add(snowball); snow.craftingQuantity = 1; craftableGameItems.Add(snow); snowball.craftingIngredients = new List <item>(); snowball.craftingIngredients.Add(snow); snowball.craftingQuantity = 1; craftableGameItems.Add(snowball); stone.craftingIngredients = new List <item>(); stone.craftingIngredients.Add(smallStone); stone.craftingIngredients.Add(smallStone); stone.craftingIngredients.Add(smallStone); stone.craftingQuantity = 1; craftableGameItems.Add(stone); sandstone.craftingIngredients = new List <item>(); sandstone.craftingIngredients.Add(sand); sandstone.craftingIngredients.Add(sand); sandstone.craftingIngredients.Add(sand); sandstone.craftingIngredients.Add(sand); sandstone.craftingQuantity = 1; craftableGameItems.Add(sandstone); foreach (var x in craftableGameItems) { if (x.craftingResults == null) { List <item> results = new List <item>(); results.Add(x); } } #endregion //Initialize structure attributes altar.name = "Altar"; altar.effect = 2; altar.strength = 3; altar.reqMat = new List <item>(); for (int i = 0; i < 5; i++) { altar.reqMat.Add(wood); } for (int i = 0; i < 10; i++) { altar.reqMat.Add(stone); altar.reqMat.Add(rope); } structures.Add(altar); mine.name = "Mine"; mine.effect = 1.1; mine.strength = 5; mine.reqMat = new List <item>(); for (int i = 0; i < 50; i++) { mine.reqMat.Add(stone); } for (int i = 0; i < 15; i++) { mine.reqMat.Add(wood); } structures.Add(mine); //Initialize Biomes List <biome> biomes = new List <biome>(); //Taiga biome taiga = new biome(); taiga.name = "taiga"; taiga.description = "\r\n As you wander about the taiga you shiver from the cold, looking around at the various possible resources \r\n"; taiga.chanceOfGettingResource = 20; taiga.resources = new List <item>(); taiga.resources.Add(stick); taiga.resources.Add(plantFiber); taiga.resources.Add(plantFiber); taiga.resources.Add(snowball); taiga.resources.Add(wood); taiga.resources.Add(smallStone); taiga.itemsDropped = new List <item>(); biomes.Add(taiga); //Desert biome desert = new biome(); desert.name = "desert"; desert.description = "\r\n Looking across the oceans of sand you see a few measely cacti and stone, nothing else among the horizon \r\n "; desert.resources = new List <item>(); desert.resources.Add(sand); desert.resources.Add(sand); desert.resources.Add(sand); desert.resources.Add(sand); desert.resources.Add(smallStone); desert.resources.Add(smallStone); desert.resources.Add(smallStone); desert.resources.Add(smallStone); desert.resources.Add(cactus); desert.resources.Add(cactus); desert.resources.Add(stick); desert.resources.Add(plantFiber); desert.chanceOfGettingResource = 5; desert.itemsDropped = new List <item>(); biomes.Add(desert); biome currentBiome = new biome(); #region InitializePlayerAndActions //Initialize Player Console.WriteLine("Hello, welcome to the game\r\n"); Console.WriteLine("What is your name, Hero?"); Player player = new Player(); //Player Attributes player.maxHealth = 20; player.health = player.maxHealth; player.strength = 5; player.armor = 0; player.name = getInput(); //Player Inventory player.inventory = new List <item>(); player.inventory.Add(stone); player.inventory.Add(stick); //Player Structure player.structuresBuilt = new List <structure>(); //Initialize Actions action look = new action(); look.title = "look around"; look.order = 1; action forage = new action(); forage.title = "forage for resources"; forage.order = 2; action droppedItems = new action(); droppedItems.title = "Pick up dropped items"; droppedItems.order = 3; action inventory = new action(); inventory.title = "access inventory"; inventory.order = 4; action crafting = new action(); crafting.title = "crafting"; crafting.order = 5; //useAxe useAxe.title = "Use Axe"; useAxe.order = 6; //Build build.title = "Build Structure"; build.order = 7; action leave = new action(); leave.title = "leave area"; leave.order = 98; action exit = new action(); exit.title = "exit"; exit.order = 99; actionList.Add(useAxe); //Player Actions player.actions = new List <action>(); player.actions.Add(look); player.actions.Add(forage); player.actions.Add(droppedItems); player.actions.Add(inventory); player.actions.Add(crafting); player.actions.Add(leave); player.actions.Add(exit); #endregion //Start Game Console.WriteLine("Welcome {0} to the geoSphere, home of various biomes.\r\n", player.name); bool running = true; bool inBattle = false; //Game Loop while (running) { Console.WriteLine("Which biome would you like to visit? your choices are: "); foreach (var x in biomes) { Console.WriteLine(x.name); } Console.Write("\r\n"); bool correctChoice = false; while (correctChoice == false) { string biomeName = getInput(); if (biomeName == "exit") { evaluateActions(player, "exit", new biome()); } foreach (var x in biomes) { if (x.name == biomeName) { currentBiome = x; correctChoice = true; } } } while (true) { Console.WriteLine("What would you like to do in the {0}?", currentBiome.name); player.actions.Sort((z, q) => z.order.CompareTo(q.order)); foreach (var x in player.actions) { Console.WriteLine(x.title); } Console.Write("\r\n"); string action = evaluateActions(player, getInput(), currentBiome); //Console.WriteLine("Thank you for visiting the taiga -geoSphere Management"); //biomes.Remove("taiga"); if (action == "leave current area" || action == "leave" || action == "travel") { break; } } if (inBattle) { } } System.Console.ReadKey(); }