Mazetar

Town.cs

Mar 25th, 2011
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 3.61 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.IO;
  6.  
  7. namespace ConsoleBarovia
  8. {
  9.     class Town
  10.     {
  11.         Hero hero = new Hero();
  12.         string input;
  13.         bool isInTown = false;
  14.         bool dangerInTown = false;
  15.         int intInput = 0;
  16.  
  17.         public void enteringTown()
  18.         {
  19.             Crossroads crossroads = new Crossroads();
  20.  
  21.  
  22.  
  23.  
  24.             Console.WriteLine("You follow the old dirt road up the small hill towards the town.");
  25.             if (hero.giveHasBeenInTown() == false)
  26.             {
  27.                
  28.                 Console.WriteLine("After walking for a while along the old and muddy dirt road,");
  29.                 Console.WriteLine("you finnaly see the village infront of you. You can see the wooden palisade");
  30.                 Console.WriteLine("Which surrounds the village,there is a small gate on the south side");
  31.                 Console.WriteLine("The gate seems to be heavily guarded for such a small village,");
  32.                 Console.WriteLine("four men at the gate and several gaurds with crossbows on top of the palisade.");
  33.                 Console.WriteLine("It would almost look as if guards are expecting trouble.");
  34.                 Console.WriteLine(" ");
  35.                 Console.WriteLine("What would you like to do?");
  36.                 Console.WriteLine("(1) Go towards the gates");
  37.                 Console.WriteLine("(2) Turn around and walk back the way I came");
  38.                 Console.WriteLine("Please choose a nummber");
  39.                 intInput = Convert.ToInt32(Console.ReadLine());
  40.                 Console.WriteLine("you choose " + intInput);
  41.                 Console.ReadLine();
  42.  
  43.                 switch (intInput)
  44.                 {
  45.                     case 1:
  46.                         Console.WriteLine("You start walking towards the gates");
  47.                         Console.WriteLine("As you walk towards the gate, one of the gaurds halts you");
  48.                         Console.WriteLine("Welcome to Barovia sir, may I ask what is your intent in the village?");
  49.                         input = Console.ReadLine(); // TODO: Add Answear Dialog
  50.                         Console.WriteLine("Hmm I see, and for how loong do you plan on staying here?");
  51.                         input = Console.ReadLine(); //TODO: Add Answears
  52.                         Console.WriteLine("Then I wish you a pleasant stay in Barovia sir");
  53.                         isInTown = true;
  54.                         hero.setHasBeenInTown(true);
  55.                         crossroads.enteringCrossRoads();
  56.                         break;
  57.  
  58.                     case 2:
  59.                         Console.WriteLine("You turn back towards the crossroads");
  60.                         Console.WriteLine("After walking for a while you finnaly spot the signpost");
  61.                         Console.ReadLine();
  62.                         Console.Clear();
  63.                         crossroads.enteringCrossRoads();
  64.                         break;
  65.                     default:
  66.                         Console.WriteLine("This is not the time to be fooling around, Invalid nummber entered:P"); //TODO: ADD Prppper reaction.
  67.                         break;
  68.                 }
  69.                
  70.                
  71.  
  72.             }
  73.             else if (dangerInTown == true)
  74.             {
  75.                 //If Town is under event/danger/wtf?
  76.             }
  77.             else
  78.             {
  79.                 Console.WriteLine("You enter the village");
  80.                 isInTown = true;
  81.                 Console.ReadLine();
  82.  
  83.             }
  84.        
  85.    
  86.         }
  87.    
  88.    
  89.  
  90.     }
  91. }
Advertisement
Add Comment
Please, Sign In to add comment