Advertisement
Guest User

C#

a guest
Mar 2nd, 2017
501
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 3.02 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApplication3
  8. {
  9.     class Initiation   //Pre-game stuff - Character name, class and game difficulty
  10.     {
  11.         static void characterCreation()
  12.         {
  13.             Console.WriteLine("Please enter your name: ");
  14.             string name = Console.ReadLine();
  15.             Console.WriteLine("\nWelcome " + name + "!");
  16.             Console.WriteLine("Please select a class:\n1. Warrior - Bonus damage with melee weapons, average health.\n2. Ranger - Reduced health, bonus damage with ranged weapons.\n3. Paladin - Low damage, bonus to health and armor.");
  17.             int cclass = Convert.ToInt32(Console.ReadLine());
  18.             switch (cclass)
  19.             {
  20.                 case 1:
  21.                     Console.WriteLine("You have chosen to be a Warrior, " + name + "!");
  22.                     break;
  23.  
  24.                 case 2:
  25.                     Console.WriteLine("You have chosen to be a Ranger, " + name + "!");
  26.                     break;
  27.  
  28.                 case 3:
  29.                     Console.WriteLine("You have chosen to be a Paladin, " + name + "!");
  30.                     break;
  31.  
  32.                 default:
  33.                     Console.WriteLine("Incorrect entry, please enter 1, 2 or 3!");
  34.                     break;
  35.             }
  36.             Initiation.difficultyMenu();
  37.         }
  38.  
  39.         static void difficultyMenu()
  40.         {
  41.             Console.WriteLine("Please select a difficulty:\n1. Easy\n2. Medium\n3. Hard");
  42.             int diff = Convert.ToInt32(Console.ReadLine());
  43.             switch (diff)
  44.             {
  45.                 case 1:
  46.                     Console.WriteLine("You have selected easy difficulty!");
  47.                     break;
  48.  
  49.                 case 2:
  50.                     Console.WriteLine("You have selected medium difficulty!");
  51.                     break;
  52.  
  53.                 case 3:
  54.                     Console.WriteLine("You have selected hard difficulty!");
  55.                     break;
  56.  
  57.                 default:
  58.                     Console.WriteLine("Incorrect entry! Please enter either 1, 2 or 3!");
  59.                     break;
  60.             }
  61.         }
  62.  
  63.  
  64.  
  65.  
  66.         static void Main(string[] args)
  67.         {
  68.             Console.WriteLine("Main Menu");
  69.             Console.WriteLine("1. Play Game");
  70.             Console.WriteLine("2. Exit");
  71.  
  72.             int choice = Convert.ToInt32(Console.ReadLine());
  73.             switch (choice)
  74.             {
  75.                 case 1:
  76.                     characterCreation();
  77.                     break;
  78.  
  79.                 case 3:
  80.                     Environment.Exit(0);
  81.                     break;
  82.  
  83.                 default:
  84.                     Console.WriteLine("Incorrect entry, please enter 1 or 2!");
  85.                     break;
  86.  
  87.             }
  88.             Console.ReadLine();
  89.  
  90.  
  91.         }
  92.     }
  93.  
  94.     class Game //Actual game
  95.     {
  96.         static void gameStart()
  97.         {
  98.  
  99.  
  100.         }
  101.     }
  102. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement