public static void Score(Player player) { Console.Clear(); getScoreFactor(player); Console.WriteLine("Points for arriving in Oregon"); Console.WriteLine("{0} people in {1} health {2} ", player.teamSize, player.health, player.peopleScore += player.teamSize * player.peopleFactor * player.scoreFactor);//poor = 200, fair = 400, good = 600 Console.WriteLine("{0} wagon {1} ", player.wagon, player.wagonScore += player.wagon * 50 * player.scoreFactor); Console.WriteLine("{0} oxen {1} ", player.numberOfOxs, player.oxenScore += player.numberOfOxs * 4 * player.scoreFactor); Console.WriteLine("{0} spare wagon parts {1} ", player.spareParts, player.sparepartScore += player.spareParts * 2 * player.scoreFactor); Console.WriteLine("{0} sets of clothing {1} ", player.setsOfClothing, player.setofclothingScore += player.setsOfClothing * 2 * player.scoreFactor); Console.WriteLine("{0} bullets {1} ", player.ammo, player.bulletScore += player.ammo / 100 * 2 * player.scoreFactor); Console.WriteLine("{0} pounds of food {1} ", player.poundsOfFoods, player.foodScore += (player.poundsOfFoods / 100) * 4 * player.scoreFactor); Console.WriteLine(" ${0} cash {1} ", player.money, player.cashScore += (Convert.ToInt32(player.money / 5) * player.scoreFactor)); Console.WriteLine(""); player.totalScore = player.peopleScore + player.wagonScore + player.oxenScore + player.sparepartScore + player.setofclothingScore + player.bulletScore + player.foodScore + player.cashScore; Console.WriteLine(" Total: {0}", player.totalScore); if (player.occupation == "farmer") { Console.WriteLine("For going as a farmer, your"); Console.WriteLine("points are tripled"); } InputDetection.Spacebar(player); player.GameIsOn = false; }
public static void ChangePace(Player player) { Console.Clear(); Console.WriteLine(" Change pace"); Console.WriteLine(" (currently {0})", player.pace); Console.WriteLine(""); Console.WriteLine(" The pace at which you travel"); Console.WriteLine(" can change. Your choices are:"); Console.WriteLine(" 1. a steady pace"); Console.WriteLine(" 2. a strenous pace"); Console.WriteLine(" 3. a grueling pace"); Console.WriteLine(" 4. find out what these"); Console.WriteLine(" different paces mean"); Console.WriteLine(""); Console.WriteLine(" what is your choice?"); InputDetection.DetectGameMenuInputOneTwoThreeOrFour(player); if (player.gameMenuInput == "D1") { player.pace = 20; //at best } if (player.gameMenuInput == "D2") { player.pace = 25; } if (player.gameMenuInput == "D3") { player.pace = 30; } if (player.gameMenuInput == "D4") { differentPacesmean(player);//TODO } }
public static void CheckSupplies(Player player) { Supplies(player); Console.WriteLine(" money left ${0}", player.money); Console.WriteLine(""); InputDetection.Space(); }
public static void Alternate2(Player player, Shop shop, List <Landmarks> listOfLandmarks) { Console.Clear(); Console.WriteLine("The trail divides here. You may:"); Console.WriteLine(""); Console.WriteLine("1. head for Fort Walla Walla"); Console.WriteLine("2. head for The Dalles"); Console.WriteLine("3. see the map"); Console.WriteLine(""); Console.WriteLine("What is your choice?"); InputDetection.DetectGameMenuInputOneTwoOrThree(player); if (player.gameMenuInput == "D1") { //DoNothing player.alternateRoute = true; player.fortWallaWalla = true; } if (player.gameMenuInput == "D2") { //index for landmarks +1 player.fortWallaWalla = false; player.theDalles = true; } if (player.gameMenuInput == "D3") { Map(player);//TODO } }
public static void TakeBarlowTollRoad(Player player, Shop shop, List <Landmarks> listOfLandmarks) { Console.Clear(); Console.WriteLine("You must pay $8.00 to travel the"); Console.WriteLine("Barlow road. Are you willing to do"); Console.WriteLine("this?"); string TakeTollRoad = Console.ReadLine(); if (TakeTollRoad == "y" || TakeTollRoad == "yes") { if (player.money < 8) { Console.Clear(); Console.WriteLine(""); headerWithDate(player); Console.WriteLine(""); Console.WriteLine("You do not have enough"); Console.WriteLine("money to pay for the Road."); Console.WriteLine(""); InputDetection.Space(); } else { Cycle(player, shop, listOfLandmarks); } } else { Alternate3(player, shop, listOfLandmarks); } }
public static void differentPacesmean(Player player) { Console.Clear(); Console.WriteLine("steady - You travel about 8 hours a"); Console.WriteLine("day, taking frequent rests. You take"); Console.WriteLine("care not to get too tired"); Console.WriteLine(""); Console.WriteLine("strenous - You travel about 12 hours"); Console.WriteLine("a day, starting just after sunrise"); Console.WriteLine("and stopping shorty before sunset."); Console.WriteLine("You stop to rest only when necessary."); Console.WriteLine("You finish each day feeling very"); Console.WriteLine("tired"); Console.WriteLine(""); Console.WriteLine("grueling - You travel about 16 hours"); Console.WriteLine("a day, starting before sunrise and"); Console.WriteLine("continuing until dark. You almost"); Console.WriteLine("never stop to rest. You do not get"); Console.WriteLine("enough sleep at night. You finish"); Console.WriteLine("each day feeling absolutely"); Console.WriteLine("exhausted, and your health suffers."); Console.WriteLine(""); InputDetection.Space(); }
public static void ShowRiverCrossing(Player player) { Console.Clear(); Console.WriteLine("Beautiful Picture of {0}", player.Landmark); Console.WriteLine(" {0}", player.Landmark); headerWithDate(player); InputDetection.Space(); }
public static void Map(Player player) { Console.Clear(); Console.WriteLine(" Map of the"); Console.WriteLine(" Oregon Trail"); Console.WriteLine(""); InputDetection.Space(); }
public static void WaitToSee(Player player) { Console.Clear(); Console.WriteLine("{0}", player.Landmark); headerWithDate(player); Console.WriteLine(""); Console.WriteLine("You camp near the river for a day."); Console.WriteLine(""); InputDetection.Space(); player.date = player.date.AddDays(1); }
public static void RiverCrossingMenu(Player player, Shop shop, List <Landmarks> listOfLandmarks) { Console.Clear(); Console.WriteLine("{0}", player.Landmark); headerWithDate(player); Console.WriteLine(""); Console.WriteLine("Weather: {0} ", player.weather); Console.WriteLine("River width: {0} ", player.riverWidth); Console.WriteLine("River depth: {0} ", player.riverDepth); Console.WriteLine(""); Console.WriteLine("You may:"); Console.WriteLine(""); Console.WriteLine("1. attempt to ford the river."); Console.WriteLine("2. caulk the wagon and float it accross"); if (listOfLandmarks[player.IndexForLandmarks].Ferry) { Console.WriteLine("3. take a ferry across"); Console.WriteLine("4. wait to see if condition improve"); Console.WriteLine("5. get more information"); } else { Console.WriteLine("3. wait to see if condition improve"); Console.WriteLine("4. get more information"); } Console.WriteLine(""); Console.WriteLine("What is your choice?"); InputDetection.DetectGameMenuInput(player, shop); if (player.gameMenuInput == "D1") { Ford(player, shop, listOfLandmarks); } if (player.gameMenuInput == "D2") { CaulkTheWagon(player, shop, listOfLandmarks); } if (player.gameMenuInput == "D3") { TakeFerry(player, shop, listOfLandmarks); } if (player.gameMenuInput == "D4") { WaitToSee(player); } if (player.gameMenuInput == "D5") { GetMoreInfo(player, shop, listOfLandmarks); } RiverCrossing(player, shop, listOfLandmarks); }
public static void ChangeFoodRations(Player player) { string rations = "unknown prob in debug1"; if (player.rations == 3) { rations = "filling"; } if (player.rations == 2) { rations = "meager"; } if (player.rations == 1) { rations = "bare bones"; } Console.Clear(); Console.WriteLine("Change food rations"); Console.WriteLine("(currently \"{0}\"", rations); Console.WriteLine(""); Console.WriteLine("The amount of food the people in"); Console.WriteLine("your party eat each day can"); Console.WriteLine("change. These amounts are:"); Console.WriteLine(""); Console.WriteLine("1. filling - meals are large and"); Console.WriteLine("generous."); Console.WriteLine(""); Console.WriteLine("2. meager - meals are small, but"); Console.WriteLine("adequate."); Console.WriteLine(""); Console.WriteLine("3. bare bones - meals are very"); Console.WriteLine("small; everyone stays hungry."); Console.WriteLine(""); Console.WriteLine("what is your chooise?"); InputDetection.DetectGameMenuInputOneTwoOrThree(player); if (player.gameMenuInput == "D1") { player.rations = 3; //at best } if (player.gameMenuInput == "D2") { player.rations = 2; } if (player.gameMenuInput == "D3") { player.rations = 1; } }
public static void CaulkTheWagon(Player player, Shop shop, List <Landmarks> listOfLandmarks) { Console.Clear(); Console.WriteLine("Caulk the wagon!"); System.Threading.Thread.Sleep(1000); Console.Clear(); Console.WriteLine("You had no trouble"); Console.WriteLine("floating the wagon"); Console.WriteLine("across."); InputDetection.Space(); player.LeavingALandmark = true; player.InitLeg = true; Cycle(player, shop, listOfLandmarks); }
public static void ToMuchFood(Player player, Shop shop) { //This prints out if to much food are bought headerWithOutDate(); Console.WriteLine(""); Console.WriteLine(" Your wagon may only carry"); Console.WriteLine(" 2000 pounds of food"); Console.WriteLine(""); Console.WriteLine(""); Console.WriteLine(""); InputDetection.Spacebar(shop); HowMuchFood(player, shop); }
public static void TakeFerry(Player player, Shop shop, List <Landmarks> listOfLandmarks) { setSomeDays(player); waitingAfterFerry(player, shop, listOfLandmarks); InputDetection.FerryYesOrNo(player, shop, listOfLandmarks); if (player.gameMenuInput == "Y") { if (player.money < 5) { Console.Clear(); Console.WriteLine("Kansas River crossing"); headerWithDate(player); Console.WriteLine(""); Console.WriteLine("You do not have enough"); Console.WriteLine("money to pay for the ferry."); Console.WriteLine(""); InputDetection.Space(); } else { while (player.someDays > 0) { player.date = player.date.AddDays(1); waitingAfterFerry(player, shop, listOfLandmarks); player.someDays -= 1; System.Threading.Thread.Sleep(1000); } Console.Clear(); Console.WriteLine("Taking the ferry!"); System.Threading.Thread.Sleep(1000); Console.Clear(); Console.WriteLine("The Ferry got your party"); Console.WriteLine("and wagon safely across."); InputDetection.Space(); player.LeavingALandmark = true; player.InitLeg = true; player.gameMenuInput = ""; Cycle(player, shop, listOfLandmarks); } } else { RiverCrossingMenu(player, shop, listOfLandmarks); } }
public static void TalkToPeople(Player player) { Console.WriteLine("A trader named Jim tells you:"); Console.WriteLine(""); Console.WriteLine("Better take extra set of"); Console.WriteLine("clothing. Trade'em to Indians"); Console.WriteLine("for fresh vegetables, fish, or"); Console.WriteLine("meat. It's well worth hiring"); Console.WriteLine("an Indian guide at river"); Console.WriteLine("crossings. Expect to pay them!"); Console.WriteLine("They're sharp traders, not"); Console.WriteLine("easily cheated."); Console.WriteLine(""); Console.WriteLine(""); InputDetection.Space(); }
public static void DifferenceMenu(Player player, Shop shop) { Console.WriteLine(" Traveling to Oregon isn't easy!"); Console.WriteLine(" But if you're a banker, you'll"); Console.WriteLine(" have more money for supplies"); Console.WriteLine(" and services than a carpenter"); Console.WriteLine(" or a farmer."); Console.WriteLine(""); Console.WriteLine(" However, harder you have"); Console.WriteLine(" to try, the more points you"); Console.WriteLine(" deserve! Therefore, the"); Console.WriteLine(" farmer earns the greatest"); Console.WriteLine(" number of points and the"); Console.WriteLine(" banker earns the least."); Console.WriteLine(""); InputDetection.Spacebar(shop); Menus.OccupationMenu(player, shop); }
public static void Alternate3(Player player, Shop shop, List <Landmarks> listOfLandmarks) { Console.Clear(); Console.WriteLine("The trail divides here. You may:"); Console.WriteLine(""); Console.WriteLine("1. float down the Columbia River"); Console.WriteLine("2. take the Barlow Toll Road"); Console.WriteLine(""); Console.WriteLine("What is your choice?"); InputDetection.DetectGameMenuInputOneOrTwo(player, shop); if (player.gameMenuInput == "D1") { player.ColumbiaRiver = true; } if (player.gameMenuInput == "D2") { TakeBarlowTollRoad(player, shop, listOfLandmarks); player.BarlowTollRoad = true; } }
public static void GetMoreInfo(Player player, Shop shop, List <Landmarks> listOfLandmarks) { Console.Clear(); Console.WriteLine("{0}", player.Landmark); headerWithDate(player); Console.WriteLine(""); Console.WriteLine("To ford a river means to"); Console.WriteLine("pull your wagon across a"); Console.WriteLine("shallow part of the river,"); Console.WriteLine("with the oxen still"); Console.WriteLine("attached"); Console.WriteLine(""); InputDetection.Space(); Console.Clear(); Console.WriteLine("{0}", player.Landmark); headerWithDate(player); Console.WriteLine(""); Console.WriteLine("To caulk the wagon means to"); Console.WriteLine("seal it so that no water can"); Console.WriteLine("get in. The wagon can then"); Console.WriteLine("be floated across like a"); Console.WriteLine("boat"); Console.WriteLine(""); InputDetection.Space(); Console.Clear(); Console.WriteLine("{0}", player.Landmark); headerWithDate(player); Console.WriteLine(""); Console.WriteLine("To use ferry means to put"); Console.WriteLine("your wagon on top of a flat"); Console.WriteLine("boat that belongs to someone"); Console.WriteLine("else. The owner of the"); Console.WriteLine("ferry will take your wagon"); Console.WriteLine("across the river"); Console.WriteLine(""); InputDetection.Space(); RiverCrossing(player, shop, listOfLandmarks); }
public static void DetectIfSpaceBarIsHit(Player player, Shop shop) { Console.WriteLine(" Press SPACE BAR to"); Console.WriteLine(" leave store"); InputDetection.DetectKeyStroke(shop); if (shop.shopInput == "Spacebar" && shop.numberOfYokes > 0) { if (player.money < shop.billTotal) { shop.playersMoney = false; PrintStoreMenu(player, shop); } if (player.money > shop.billTotal) { shop.playersMoney = true; shop.shoping = false; shop.shopInput = ""; player.money -= shop.billTotal; GodbyeShop(); //move stuff to wagon player.numberOfOxs = shop.numberOfYokes * 2; player.numberOfYokes = shop.numberOfYokes; player.poundsOfFoods = shop.poundsOfFoods; player.setsOfClothing = shop.setsOfClothing; player.spareParts = shop.spareParts; player.wagonAxel = shop.wagonAxel; player.wagonTounge = shop.wagonTounge; player.wagonWheel = shop.wagonWheel; } } else { Console.Clear(); PrintStoreMenu(player, shop); } }
public static void RiverCrossing(Player player, Shop shop, List <Landmarks> listOfLandmarks) { if (player.Landmark.EndsWith("crossing")) { ; } { Console.Clear(); Console.WriteLine("{0}", player.Landmark); headerWithDate(player); Console.WriteLine(""); Console.WriteLine("You must cross the river in"); Console.WriteLine("order to continue. The"); Console.WriteLine("river at this point is "); Console.WriteLine("currently {0} feet across,", player.riverWidth); Console.WriteLine("and {0} feet deep in the", player.riverDepth); Console.WriteLine("middle"); Console.WriteLine(""); InputDetection.Space(); player.krc = true; RiverCrossingMenu(player, shop, listOfLandmarks); } }
public static void PrintGameMenu(Player player, Shop shop, List <Landmarks> listOfLandmarks) { while (player.GameMenu) { Console.Clear(); //if(player.AtLandmark) //{ // PlaceAt(player); //} Console.WriteLine(" {0}", listOfLandmarks[player.IndexForLandmarks].Name); headerWithDate(player); StatusBar(player); Console.WriteLine("You may:"); Console.WriteLine(" 1. Continue on trail"); Console.WriteLine(" 2. Check supplies"); Console.WriteLine(" 3. Look at map"); Console.WriteLine(" 4. Change pace"); Console.WriteLine(" 5. Change food rations"); Console.WriteLine(" 6. Stop to rest"); Console.WriteLine(" 7. Attempt to trade"); Console.WriteLine(" 8. Talk to people"); if (listOfLandmarks[player.IndexForLandmarks].Shop) { Console.WriteLine(" 9. Buy supplies"); } Console.WriteLine(""); Console.WriteLine("What is your choice?"); InputDetection.DetectGameMenuInput(player, shop); if (player.gameMenuInput == "D1" && player.insidecycle == true) { break; } if (player.gameMenuInput == "D1") { if (player.Landmark == "Independence") { Cycle(player, shop, listOfLandmarks); } if (player.Landmark == "Kansas River crossing") { RiverCrossing(player, shop, listOfLandmarks); break; } if (player.Landmark == "Big Blue River crossing") { RiverCrossing(player, shop, listOfLandmarks); break; } if (player.Landmark == "Fort Kearney") { Cycle(player, shop, listOfLandmarks); break; } if (player.Landmark == "Chimney Rock") { Cycle(player, shop, listOfLandmarks); break; } if (player.Landmark == "Fort Laramie") { Cycle(player, shop, listOfLandmarks); break; } if (player.Landmark == "Indipendence Rock") { Cycle(player, shop, listOfLandmarks); break; } if (player.Landmark == "South Pass") { Alternate1(player, shop, listOfLandmarks); Cycle(player, shop, listOfLandmarks); break; } if (player.Landmark == "Green River") { RiverCrossing(player, shop, listOfLandmarks); break; } if (player.Landmark == "Fort Bridger") { Cycle(player, shop, listOfLandmarks); break; } if (player.Landmark == "Soda Springs") { Cycle(player, shop, listOfLandmarks); break; } if (player.Landmark == "Fort Hall") { Cycle(player, shop, listOfLandmarks); break; } if (player.Landmark == "Snake River") { Cycle(player, shop, listOfLandmarks); break; } if (player.Landmark == "Fort Boise") { Cycle(player, shop, listOfLandmarks); break; } if (player.Landmark == "Blue Mountains") { Alternate2(player, shop, listOfLandmarks); Cycle(player, shop, listOfLandmarks); break; } if (player.Landmark == "Fort WALLA WALLA") { Cycle(player, shop, listOfLandmarks); break; } if (player.Landmark == "The Dalles") { Alternate3(player, shop, listOfLandmarks); //Cycle(player, shop, listOfLandmarks); break; } if (player.Landmark == "Willamette Valley Oregon") { } } if (player.gameMenuInput == "D2") { CheckSupplies(player); } if (player.gameMenuInput == "D3") { Map(player); } if (player.gameMenuInput == "D4") { ChangePace(player); } if (player.gameMenuInput == "D5") { ChangeFoodRations(player); } if (player.gameMenuInput == "D6") { StopToRest(player); } if (player.gameMenuInput == "D7") { AttemptToTrade(player); } if (player.gameMenuInput == "D8") { TalkToPeople(player); } if (player.gameMenuInput == "D9") { BuySupplies(player, shop); } } }
public static void HowManySpareParts(Player player, Shop shop, string shopInput) { while (!shop.shopSpareParts) { if (!shop.wheel) { headerWithOutDate(); SparePartHeader(); if (!shop.ToManySpearParts) { Console.WriteLine(" How many wagon wheels ?"); BillSoFar(shop); if (player.debug) { shop.wagonWheel = 1; } else { shop.wagonWheel = int.Parse(Console.ReadLine()); } } if (shop.ToManySpearParts) { Console.WriteLine(" Your wagon may only carry 3"); Console.WriteLine(" wagon wheels"); Console.WriteLine(""); InputDetection.Spacebar(shop); shop.wagonWheel = -1; shop.ToManySpearParts = false; } if (shop.wagonWheel >= 0 && shop.wagonWheel < 4) { shop.wheel = true; shop.axel = true; shop.ToManySpearParts = false; } if (shop.wagonWheel > 3) { shop.ToManySpearParts = true; } } if (shop.axel) { headerWithOutDate(); SparePartHeader(); if (!shop.ToManySpearParts) { Console.WriteLine(" How many wagon axles ?"); BillSoFar(shop); shop.wagonAxel = int.Parse(Console.ReadLine()); } if (shop.ToManySpearParts) { Console.WriteLine(" Your wagon may only carry 3"); Console.WriteLine(" wagon axles."); Console.WriteLine(""); InputDetection.Spacebar(shop); shop.wagonWheel = -1; shop.ToManySpearParts = false; } if (shop.wagonAxel >= 0 && shop.wagonAxel < 4) { shop.axel = false; shop.tongue = true; shop.ToManySpearParts = false; } if (shop.wagonAxel > 3) { shop.ToManySpearParts = true; } } if (shop.tongue) { headerWithOutDate(); SparePartHeader(); if (!shop.ToManySpearParts) { Console.WriteLine(" How many wagon tounge ?"); BillSoFar(shop); shop.wagonTounge = int.Parse(Console.ReadLine()); } if (shop.ToManySpearParts) { Console.WriteLine(" Your wagon may only carry 3"); Console.WriteLine(" wagon tounge."); Console.WriteLine(""); InputDetection.Spacebar(shop); shop.wagonTounge = -1; shop.ToManySpearParts = false; } if (shop.wagonTounge >= 0 && shop.wagonTounge < 4) { shop.tongue = false; shop.shopSpareParts = true; shop.ToManySpearParts = false; } if (shop.wagonTounge > 3) { shop.ToManySpearParts = true; } } } shop.spareParts = shop.wagonWheel + shop.wagonAxel + shop.wagonTounge; shop.totalSparePartsPrice = shop.spareParts * shop.sparePartsPrice; shop.billTotal = shop.totalSparePartsPrice; shop.shopInput = ""; PrintStoreMenu(player, shop); }
public static void PrintStoreMenu(Player player, Shop shop) { while (shop.shoping) { if (shop.shopInput == "" || shop.shopInput == "Spacebar") { headerWithDate(player); } if (shop.shopInput == "D1" || shop.shopInput == "D2" || shop.shopInput == "D3" || shop.shopInput == "D4" || shop.shopInput == "D5") { headerWithOutDate(); } if (shop.shopInput == "D1") { HowManyOxen(player, shop, shop.shopInput); break; } if (shop.shopInput == "D2") { HowMuchFood(player, shop); break; } if (shop.shopInput == "D3") { HowManySetsOfClothes(player, shop, shop.shopInput); shop.shopInput = ""; break; } if (shop.shopInput == "D4") { HowMuchAmmo(player, shop, shop.shopInput); shop.shopInput = ""; break; } if (shop.shopInput == "D5") { HowManySpareParts(player, shop, shop.shopInput); shop.shopInput = ""; break; } if (shop.shopInput == "" || shop.shopInput == "Spacebar") { printBill(shop, shop.billTotal); } if (shop.shopInput == "") { AmountYouHave(player); } if (shop.shopInput == "") { WichItemToBuy(); } if (shop.shopInput == "") { DetectIfSpaceBarIsHit(player, shop); } if (shop.shopInput == "Spacebar" && shop.playersMoney == true) { DontForgetToBuyOx(); InputDetection.Spacebar(shop); } if (shop.shopInput == "Spacebar" && shop.playersMoney == false) { NotEnoughMoney(player, shop); InputDetection.Spacebar(shop); } } }
public static void TheStore(Player player, Shop shop) { if (!player.debug) { Console.WriteLine("Before leaving Independence you"); Console.WriteLine("should buy equipment and"); Console.WriteLine("supplies.you have $1600.00 in"); Console.WriteLine("cash, but don't have to"); Console.WriteLine("spend it all now."); Console.WriteLine(""); InputDetection.Spacebar(shop); Console.Clear(); Console.WriteLine("You can buy whatever you need at"); Console.WriteLine("Matt's General Store."); Console.WriteLine(""); InputDetection.Spacebar(shop); Console.Clear(); Console.WriteLine("Hello, I'm Matt. So you're going"); Console.WriteLine("to Oregon!I can fix you up with"); Console.WriteLine("what you need:"); Console.WriteLine(""); Console.WriteLine("-a team of oxen to pull your wagon"); Console.WriteLine("- clothing for both summer and winter"); Console.WriteLine(""); InputDetection.Spacebar(shop); Console.Clear(); Console.WriteLine("Hello, I'm Matt. So you're going"); Console.WriteLine("to Oregon!I can fix you up with"); Console.WriteLine("what you need:"); Console.WriteLine(""); Console.WriteLine("- plenty of food for the trip"); Console.WriteLine("- ammunition for your rifles"); Console.WriteLine("- spare parts for your wagon"); Console.WriteLine(""); InputDetection.Spacebar(shop); Console.Clear(); } PrintStoreMenu(player, shop); if (shop.shopInput == "D1") { HowManyOxen(player, shop, shop.shopInput); } if (shop.shopInput == "D2") { HowMuchFood(player, shop); } if (shop.shopInput == "D3") { HowManySetsOfClothes(player, shop, shop.shopInput); } if (shop.shopInput == "D4") { HowMuchAmmo(player, shop, shop.shopInput); } if (shop.shopInput == "D5") { HowManySpareParts(player, shop, shop.shopInput); } }
static void Main(string[] args) { //INIT bool startGame = true; while (startGame) { Program program = new Program(); Player player = new Player(); Shop shop = new Shop(); List <Landmarks> listOfLandmarks = new List <Landmarks>(); program.gameon(player, shop, listOfLandmarks); var input = 1; if (player.debug) { player.occupation = "Farmer"; player.scoreFactor = 3;//banker = 1, carpenter = 2, farmer = 3 player.money = 4; player.name1 = "Gunni"; player.name2 = "Liney"; player.name3 = "Birta"; player.name4 = "Victor"; player.name5 = "Margret"; string date = "01-03-1848"; DateTime dateOfDeparture = Convert.ToDateTime(date); player.date = dateOfDeparture; player.numberOfOxs = 6; player.numberOfYokes = 3; player.poundsOfFoods = 140; player.setsOfClothing = 4; player.money = 500; player.ammo = 57; player.spareParts = 6; player.wagonWheel = 2; player.wagonAxel = 2; player.wagonTounge = 2; } else { input = Menus.StartScreenMenu(); if (input == 1) { Menus.OccupationMenu(player, shop); } if (input == 1 || input == 2 || input == 3) { Menus.NameMenu(player); } Menus.DateOfDeparture(player); Console.Clear(); Store.TheStore(player, shop); //Gameloop InputDetection.Spacebar(shop); } while (player.GameIsOn) { player.Landmark = listOfLandmarks[player.IndexForLandmarks].Name; 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; }