private void InsertRow() { var item = new MonthText(); Riddles = Riddles == null ? new ObservableCollection <MonthText>() : Riddles; Riddles.Add(item); }
public void ApplyAllRiddles() { List <Riddle> easyRiddles = Riddles.GetEasyRiddles(); List <Riddle> mediumRiddles = Riddles.GetMediumRiddles(); List <Riddle> hardRiddles = Riddles.GetHardRiddles(); foreach (Citizen c in easyCitizens) { Riddle r = easyRiddles[Random.Range(0, easyRiddles.Count)]; c.SetRiddle(r); easyRiddles.Remove(r); } foreach (Citizen c in mediumCitizens) { Riddle r = mediumRiddles[Random.Range(0, mediumRiddles.Count)]; c.SetRiddle(r); mediumRiddles.Remove(r); } foreach (Citizen c in hardCitizens) { Riddle r = hardRiddles[Random.Range(0, hardRiddles.Count)]; c.SetRiddle(r); hardRiddles.Remove(r); } }
static void Main(string[] args) { int answer; Console.WriteLine("Hello Stranger! I think, you want to play a game. So I have 3 to choose from."); Console.WriteLine("If you want to guess riddles from Sphynx, enter '1'."); Console.WriteLine("If you want to guess the number I think, enter '2'."); Console.WriteLine("If you want to test my guessing abilities, enter '3'."); answer = Convert.ToInt32(Console.ReadLine()); var form1 = new try4.Riddles(); var form2 = new try3.guessing_game_1(); var form3 = new try5.guessing_game_2(); if (answer == 1) { Riddles.RiddlesGame(); } if (answer == 2) { guessing_game_1.solution_1(); } if (answer == 3) { guessing_game_2.solution_2(); } }
protected override void Start() { if (TESTMODE) { wantedItems.Add(GameObject.Find("[TEST] PickUpable3_Yellow(Clone)")); } riddles = GetComponent <Riddles>() ?? null; }
public static void Main() { Riddles question1 = new Riddles("What kind of goose fights with snakes?", "mongoose"); Riddles question2 = new Riddles("I am wet when drying. What am I?", "towel"); Riddles question3 = new Riddles("What word is always pronounced wrong?", "wrong"); List <Riddles> Questions = new List <Riddles>() { question1, question2, question3 }; AskAnotherQuestion(); void AskAnotherQuestion() { Random rnd = new Random(); int intRiddle = rnd.Next(Questions.Count); Console.WriteLine(Questions[intRiddle].GetQuestion()); string userInput = Console.ReadLine(); if (userInput.Contains(Questions[intRiddle].GetAnswer())) { Console.WriteLine("Correct!"); Console.WriteLine("Would you like to answer another question? If yes, type 'y', if no, type 'n'"); string anotherQuestion = Console.ReadLine().ToLower(); if (anotherQuestion == "y") { AskAnotherQuestion(); } else { Console.WriteLine("Thanks for playing!"); } } else { Console.WriteLine("You've been eaten by the Sphinx!"); } } }
public static void Main() { Riddles teapot = new Riddles("What begins with T, ends with T, and has T in it?", "teapot"); // teapot.Riddle = ; // teapot.Punchline = ; Riddles egg = new Riddles("What has to be broken before it can be used?", "egg"); // egg.Riddle = ; // egg.Punchline = ; Riddles breath = new Riddles("You can hold it without using your hands or your arms. What is it?", "breath"); // breath.Riddle = ; // breath.Punchline = ; // List<Riddles> RiddleList = new List<Riddles>() {teapot, egg, breath}; object[] riddles = { teapot.Punchline, egg.Punchline, breath.Punchline }; Console.WriteLine(riddles[1]); }
static void Main(string[] args) { // Code to make a menu for a user interface (working with classes and stuff like that) bool visible = true; Console.BackgroundColor = ConsoleColor.Black; for (int i = 0; i < 10; i++) { //Press Ctrl + C to Quit string alert = "****************************************************************************************************************************************************************************" + "\n****************************************************************************************************************************************************************************" + "\n****************************************************************************************************************************************************************************" + "\n\t\t\t\tWho dare disturb the Great Flambini All Powerful and Majestic Mystic of the Futuuuuurrrreeeee!!!!"; Console.ForegroundColor = visible ? ConsoleColor.White : ConsoleColor.DarkRed; visible = !visible; Console.Clear(); Console.WriteLine(alert); Console.ForegroundColor = ConsoleColor.Black; Thread.Sleep(300); } Console.ForegroundColor = ConsoleColor.DarkRed; Directory.SetCurrentDirectory(@"../../.."); Console.WriteLine(); string inputLine = ""; using (StreamReader sr = new StreamReader("flambiniface.txt")) { while (!sr.EndOfStream) { inputLine = sr.ReadLine(); Console.WriteLine($"\t\t\t\t\t\t {inputLine}"); } } Console.WriteLine("\t\t\t\t\t\t\tPress [ENTER] to enter into my mystical domain"); Console.ReadLine(); Console.Clear(); bool menu = true; string Progresbar = "The Mystical All Powerful Flambini"; var title = ""; for (int i = 0; i < Progresbar.Length; i++) { title += Progresbar[i]; Console.Title = title; Thread.Sleep(100); } title = ""; while (menu == true) { Console.WriteLine("****************************************************************************************************************************************************************************"); Console.WriteLine("\n****************************************************************************************************************************************************************************"); Console.WriteLine("\n****************************************************************************************************************************************************************************"); Console.Write( "\t\t\t\t\t\t\t1) Fortune Teller" + "\n\t\t\t\t\t\t\t2) Magic 8-Ball (SFW)" + "\n\t\t\t\t\t\t\t3) Magic 8-Ball (NSFW)" + "\n\t\t\t\t\t\t\t4) Riddle Giver" + "\n\t\t\t\t\t\t\t5) Rock Paper Scissors" + "\n\t\t\t\t\t\t\t6) Random Fact Giver" + "\n\t\t\t\t\t\t\t7) Paper Rock Scissors" + "\n\t\t\t\t\t\t\tQ) Quit" + "\n\n\n\t\t\t\t\t\t\tPlease choose an option: "); String input = Console.ReadLine().ToLower().Trim(); if (input.Length == 0) { Console.Clear(); continue; } if (input.Length > 1) { Console.Clear(); continue; } input = input.Substring(0, 1); if (input == "q") { menu = false; break; } else if (input == "1") { FortuneTeller fortuneTeller = new FortuneTeller(); fortuneTeller.fortuneTeller(); } else if (input == "2") { MagicEightBall_SFW_ magicEightBallSFW = new MagicEightBall_SFW_(); magicEightBallSFW.magicEightBallSFW(); } else if (input == "3") { MagicEightBall_NSFW_ magicEightBallNSFW = new MagicEightBall_NSFW_(); magicEightBallNSFW.magicEightBallNSFW(); } else if (input == "4") { Riddles riddle = new Riddles(); riddle.riddleGiver(); } else if (input == "5") { RockPaperScissors rps = new RockPaperScissors(); rps.RPS(); } else if (input == "6") { RandomFactGiver fact = new RandomFactGiver(); fact.factGiver(); } else if (input == "7") { RageInducingRockPaperScissors rps = new RageInducingRockPaperScissors(); rps.RIRPS(); } else { Console.Clear(); continue; } } Console.Clear(); string credit = "\t\t\tThe Great Flambini is brought to you by a collaborative effort from the following Tech Elevator Cohort 12 .NET Members:\n\n\t\t\t\t\t Brandon \"Intellesense\" Best \n\t\t\t\t\t Glenn \"The Builder\" Weber \n\t\t\t\t\t Bradley \"Big Papa\" Hills \n\t\t\t\t\t Reid \"The Golden Steed\" Larson \n\t\t\t\t\t Will \"Swift Squirrel\" Schneider \n\t\t\t\t\t With a Special Thanks to \"Magic\" Mike Morel for filling our brains with magic! \n\t\t\t\t\t Thank you for visiting the Great Flambini\n\n\n\t\t\t\t\t Press [ENTER] to exit the Flambini"; var Credit = ""; for (int i = 0; i < credit.Length; i++) { Credit = credit[i] + ""; Console.Write($"{Credit}"); Thread.Sleep(25); } Console.ReadLine(); //Console.Clear(); //Credits firstCredits = new Credits(); //Console.WriteLine($"{firstCredits.Contributers()}"); //Console.WriteLine(); //Console.WriteLine("\t\t\t Press [Enter] to exit the Great Flambini"); //Console.ReadLine(); }