Exemplo n.º 1
0
 public string CreateSportsStory(SportsStory word)
 {
     return($" The last time I played {word.Sport}.  We {word.Verb} \n" +
            $"to {word.Place} to play. The {word.Noun} moved along {word.Adverb}. \n " +
            $"I scored {word.Points} against {word.Person}. Did I win? {word.Win}, \n " +
            $"and I never played again.");
 }
Exemplo n.º 2
0
        private void PlayTheSportsStory()
        {
            SportsStory newSportsStory = new SportsStory();

            SportsStory_Repo newSRepo = new SportsStory_Repo();

            Console.WriteLine("Please enter a sport:");
            newSportsStory.Sport = Console.ReadLine();


            Console.WriteLine("Please enter an adverb (example: quickly, softly, well)");
            newSportsStory.Adverb = Console.ReadLine();

            Console.WriteLine("Please enter points");
            string pointAsString = Console.ReadLine();

            newSportsStory.Points = int.Parse(pointAsString);



            Console.WriteLine("Did they win? (y/n)");
            string winAsString = Console.ReadLine().ToLower();

            if (winAsString == "y")
            {
                newSportsStory.Win = true;
            }
            else
            {
                newSportsStory.Win = false;
            }

            Console.WriteLine("Please enter a name");
            newSportsStory.Person = Console.ReadLine();

            Console.WriteLine("Please enter a noun");
            newSportsStory.Noun = Console.ReadLine();

            Console.WriteLine("Please enter a place");
            newSportsStory.Place = Console.ReadLine();

            Console.WriteLine("Please enter a verb");
            newSportsStory.Verb = Console.ReadLine();



            Console.WriteLine(newSRepo.CreateSportsStory(newSportsStory));
        }