private static void HarvestSelectionDialog(Seed seed) { string anweisung; while (true) { PrintInfoMessage("Which crop do you want to harvest? [enter comma seperated indexes; back]\r\n\r\n" + seed.GetCropInfo()); anweisung = Console.ReadLine(); if (anweisung == "back" || anweisung == "b") { break; } try { string[] indexStrings = anweisung.Split(','); int[] indexes = Array.ConvertAll(indexStrings, int.Parse); seed.Harvest(indexes); break; } catch (Exception ex) { PrintInfoMessageAndWait(ex.Message); } } }
private static void HarvestAllDialog(Seed seed) { string anweisung; while (true) { PrintInfoMessage("Do you really want to harvest all crops? They will be put in your inventory. [yes; no]\r\n\r\n" + seed.GetCropInfo()); anweisung = Console.ReadLine(); if (anweisung == "yes" || anweisung == "y") { seed.Harvest(); PrintInfoMessageAndWait("Crops harvested! They have been placed in your inventory."); break; } else if (anweisung == "no" || anweisung == "n") { break; } } }
private static void HarvestSelectionDialog(Seed seed) { string anweisung; while(true) { PrintInfoMessage("Which crop do you want to harvest? [enter comma seperated indexes; back]\r\n\r\n" + seed.GetCropInfo()); anweisung = Console.ReadLine(); if (anweisung == "back" || anweisung == "b") break; try { string[] indexStrings = anweisung.Split(','); int[] indexes = Array.ConvertAll(indexStrings, int.Parse); seed.Harvest(indexes); break; } catch(Exception ex) { PrintInfoMessageAndWait(ex.Message); } } }
private static void HarvestAllDialog(Seed seed) { string anweisung; while (true) { PrintInfoMessage("Do you really want to harvest all crops? They will be put in your inventory. [yes; no]\r\n\r\n" + seed.GetCropInfo()); anweisung = Console.ReadLine(); if (anweisung == "yes" || anweisung == "y") { seed.Harvest(); PrintInfoMessageAndWait("Crops harvested! They have been placed in your inventory."); break; } else if (anweisung == "no" || anweisung == "n") break; } }