public static void SpaceOrYes(Player player, Shop shop, List <Landmarks> listOfLandmarks) { Console.WriteLine(" Press SPACE BAR to continue"); ConsoleKeyInfo GameMenuInput = Console.ReadKey(); if (GameMenuInput.Key == ConsoleKey.Spacebar) { //GameMenu.ShowRiverCrossing(player); //GameMenu.PrintGameMenu(game, player, shop, listOfLandmarks); player.gameMenuInput = ""; } if (GameMenuInput.Key == ConsoleKey.Y) { ConsoleKeyInfo c = Console.ReadKey(); if (c.Key == ConsoleKey.Enter) { GameMenu.ShowRiverCrossing(player); GameMenu.PrintGameMenu(player, shop, listOfLandmarks); } } }
public static void Cycle(Player player, Shop shop, List <Landmarks> listOfLandmarks)//, Program program) { player.AtFort = false; while (player.Traveling) { if (player.InitLeg) { player.theLeg = listOfLandmarks[player.IndexForLandmarks].DistanceToNextLandmark; player.InitLeg = false; } else { if (player.theLeg <= 0) { if (listOfLandmarks[player.IndexForLandmarks + 1].Name == "Willameete Valley Oregon") { Console.Clear(); Console.WriteLine("pic of valley"); Console.WriteLine(""); Console.WriteLine(""); headerWithDate(player); InputDetection.Spacebar(player); Console.Clear(); Console.WriteLine(" Congratulations! You have"); Console.WriteLine(" made it to Oregon! Let's"); Console.WriteLine(" see how many points you have"); Console.WriteLine(" recived."); Console.WriteLine(" Willamwette Valley"); Console.WriteLine(" September 24, 1848"); InputDetection.Spacebar(player); player.Traveling = false; Score(player); break; } player.IndexForLandmarks += 1; var i = listOfLandmarks[player.IndexForLandmarks].DistanceToNextLandmark; player.MilesToNextLandmark = i; player.Landmark = listOfLandmarks[player.IndexForLandmarks].Name; player.InitLeg = true; player.ArrivingLanmark = true; player.LegMiles = player.MilesToNextLandmark; if (player.greenRiverCrossing) { player.IndexForLandmarks += 2; player.Landmark = listOfLandmarks[player.IndexForLandmarks].Name; player.greenRiverCrossing = false; } if (player.WillametteValley) { } } else { //calculates miles traveled //player.pace = player. //food consumed player.date = player.date.AddDays(1); player.poundsOfFoods -= player.teamSize * player.rations; var TempNextLandmark = player.theLeg; var tempMiles = TempNextLandmark - player.pace; if (tempMiles <= 0) { player.MilesTraveled += player.theLeg; player.theLeg = 0; } else { player.theLeg = player.theLeg - player.pace; player.MilesTraveled += player.pace; } player.AtLandmark = false; } } if (player.fortBridger) { player.IndexForLandmarks += 1; player.theLeg = listOfLandmarks[9].Distance; player.fortBridger = false; } if (player.fortWallaWalla) { //player.IndexForLandmarks += 1; player.theLeg = listOfLandmarks[14].DistanceToNextLandmark; //player.fortWallaWalla = false; } if (player.theDalles) { player.IndexForLandmarks += 1; player.theLeg = listOfLandmarks[15].DistanceToNextLandmark; player.theDalles = false; } if (player.ShowMessage) { Message(player, listOfLandmarks); } if (!player.AtLandmark) { Console.WriteLine(" Press ENTER to size up the situation"); } Status(player); if (player.LeavingALandmark) { if (player.ArrivingLanmark) { InputDetection.YesOrNo(player, shop, listOfLandmarks); } else { InputDetection.SpacebarAndCycle(player, shop, listOfLandmarks); player.LeavingALandmark = false; } if (player.gameMenuInput == "Y") { GameMenu.ShowRiverCrossing(player); GameMenu.PrintGameMenu(player, shop, listOfLandmarks); } if (player.gameMenuInput == "N") { GameMenu.PrintGameMenu(player, shop, listOfLandmarks); } if (player.gameMenuInput == "") { //GameMenu.PrintGameMenu(player, shop, listOfLandmarks); } } if (!player.AtLandmark) { while (Console.KeyAvailable) { if (Console.ReadKey(true).Key == ConsoleKey.Enter) { player.insidecycle = true; PrintGameMenu(player, shop, listOfLandmarks); } } System.Threading.Thread.Sleep(1000); } } player.insidecycle = false; }