Mazetar

Crossroads.cs

Mar 25th, 2011
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 3.57 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace ConsoleBarovia
  7. {
  8.     class Crossroads
  9.     {
  10.  
  11.         #region get&set
  12.          bool firsttime;
  13.         int crossCounter;
  14.         public bool getFirstTime()
  15.         {
  16.             return this.firsttime;
  17.         }
  18.         public void setFirstTime(bool F)
  19.         {
  20.             this.firsttime = F;
  21.         }
  22.  
  23.         public int getCrossCounter()
  24.         {
  25.             return this.crossCounter;
  26.         }
  27.  
  28.         public void setCrossCounter(int CC)
  29.         {
  30.             this.crossCounter = CC;
  31.         }
  32.  
  33.  
  34. #endregion get&set
  35.  
  36.         string input;
  37.         int intInput;
  38.         Town town = new Town();
  39.         Hero hero = new Hero();
  40.         Swamp swamp = new Swamp();
  41.  
  42.         public void enteringCrossRoads()
  43.         {
  44.            
  45.  
  46.                 Console.WriteLine("(1) Baroivia Village");
  47.                 Console.WriteLine("(2) The Dark Woods");
  48.                 Console.WriteLine("(3) Thunder Mountain Road");
  49.                 Console.WriteLine("(4) Misty Swamps");
  50.                 Console.WriteLine("(0) Leave this place [EXIT GAME]");
  51.                 intInput = Convert.ToInt32(Console.ReadLine());
  52.  
  53.                 switch (intInput)
  54.                 {
  55.                     case 1:
  56.                         {
  57.                             setCrossCounter(+1);
  58.                             town.enteringTown();
  59.                             break;
  60.                            
  61.                         }
  62.                     case 2:
  63.                         {
  64.                             this.setCrossCounter(+1);
  65.                             Console.WriteLine("You enter the Dark Woods");
  66.                             Console.WriteLine("[HERE I WILL ADD DW FUNCTION]");
  67.                             Console.ReadLine();
  68.  
  69.                             break;
  70.                         }
  71.                     case 3:
  72.                         {
  73.                             crossCounter += 1;
  74.                             Console.WriteLine("You follow the trail towards Thunder Mountain");
  75.                             Console.WriteLine("[HERE I WILL ADD TM FUNCTION]");
  76.                             Console.ReadLine();
  77.                             break;
  78.                         }
  79.                     case 4:
  80.                         {
  81.                             crossCounter += 1;
  82.                             swamp.enteringSwamp();
  83.                             break;
  84.                            
  85.                         }
  86.                     case 0:
  87.                         {
  88.                             Console.WriteLine("You are about to exit the program");
  89.                             Console.WriteLine("You have ventured past the cross roads");
  90.                             Console.WriteLine(this.getCrossCounter() + " times, and reached level "); //TODO: Add level here
  91.                             Console.WriteLine("PROGRAM WILL NOW EXIT");
  92.                             Console.ReadLine();
  93.                             //TODO: Add Exit Function
  94.                             //TODO: Add Save Function
  95.                             break;
  96.                         }
  97.  
  98.                     default:
  99.                         {
  100.                             crossCounter += 1;
  101.                             Console.WriteLine("Unable to make up your own mind, you rethink the last seconds");
  102.                             enteringCrossRoads();
  103.                             break;
  104.                         }
  105.                 }
  106.             }
  107.            
  108.            
  109.  
  110.         }
  111.  
  112.  
  113.  
  114.  
  115.  
  116.     }
Advertisement
Add Comment
Please, Sign In to add comment