Advertisement
Guest User

Untitled

a guest
Feb 11th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.41 KB | None | 0 0
  1. namespace Spel
  2. {
  3. class Program2
  4. {
  5. static void Main(string[] args)
  6. {
  7. Console.ForegroundColor = ConsoleColor.Blue;
  8. Console.WriteLine(@"
  9. _____ _ _
  10. / ____| | | (_)
  11. | (___ _ _ | |__ ___ ___ _ __ ___ ___ _ ___ _ _ ___
  12. \___ \ | | | | | '_ \ / __| / _ \ | '_ \ / __| / __| | | / _ \ | | | | / __|
  13. ____) | | |_| | | |_) | | (__ | (_) | | | | | \__ \ | (__ | | | (_) | | |_| | \__ \
  14. |_____/ \__,_| |_.__/ \___| \___/ |_| |_| |___/ \___| |_| \___/ \__,_| |___/
  15. ");
  16. Console.ForegroundColor = ConsoleColor.Red;
  17. string inledning = @"Välkommen till Subconscious
  18. För att börja programmet ange ditt namn : ";
  19. for (int i = 0; i < inledning.Length; i++)
  20. {
  21. Console.Write(inledning[i]);
  22. System.Threading.
  23. Thread.Sleep(50);
  24. }
  25. string namnkod;
  26. string namn = Console.ReadLine();
  27. var koder = new string[]
  28. { "1", "2", "Magma", "Alien" };
  29. var random = new Random();
  30. var nrandom = random.Next(koder.Length);
  31. Console.Write($"\n" + namn + $", din unika kod är : '{koder[nrandom]}'\nTryck på ENTER för att fortsätta...");
  32. namnkod = koder[nrandom]
  33. Console.ReadKey();
  34. Console.Clear();
  35. Meny();
  36. }
  37. public static void Meny()
  38. {
  39. Console.ForegroundColor = ConsoleColor.Green;
  40. string welcome = @"
  41. -------------------
  42. Dekrypterar meddelande
  43. -------------------
  44. Kontaktar mainframe...
  45. Fastställt kontakt...
  46. 10%
  47. 20%
  48. 30%
  49. 40%
  50. 50%
  51. 60%
  52. 70%
  53. 80%
  54. 90%
  55. 100%
  56. ------------------
  57.  
  58. Inkommande meddelande redo, tryck på ENTER för att ta emot det..."
  59. ;
  60. for (int i = 0; i < welcome.Length; i++)
  61. {
  62. Console.Write(welcome[i]);
  63. System.Threading.
  64. Thread.Sleep(50);
  65. }
  66. Console.ReadKey();
  67. Console.Clear();
  68. bakgrund();
  69.  
  70. }
  71. public static void bakgrund()
  72. {
  73.  
  74. string bakgrund = @"
  75. Mr X : " + namn + ", det här är Mr.X ";
  76.  
  77. for (int i = 0; i < bakgrund.Length; i++)
  78. {
  79. Console.Write(bakgrund[i]);
  80. System.Threading.
  81. Thread.Sleep(50);
  82. }
  83.  
  84. Console.ReadKey();
  85. Console.Clear();
  86. förstaVal();
  87. }
  88.  
  89. public static void förstaVal()
  90. {
  91. string val;
  92.  
  93. Console.WriteLine("");
  94. Console.WriteLine("");
  95. Console.WriteLine("1. \n2.");
  96. Console.Write("Ditt val : ");
  97. val = Console.ReadLine();
  98. Console.Clear();
  99.  
  100. switch (val)
  101. {
  102. case "1":
  103. {
  104. Console.WriteLine("");
  105. Console.WriteLine("");
  106. Console.WriteLine("");
  107. Console.ReadLine();
  108. break;
  109. }
  110. case "2":
  111. {
  112. Console.WriteLine("");
  113. Console.WriteLine("");
  114. Console.WriteLine("");
  115. Console.ReadLine();
  116. break;
  117. }
  118.  
  119. default:
  120. {
  121. Console.WriteLine("Ange endast siffror från 1-2... \nTryck på ENTER för att svara igen...");
  122. Console.ReadLine();
  123. förstaVal();
  124. break;
  125. }
  126. }
  127. }
  128. }
  129. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement