Advertisement
Guest User

Untitled

a guest
Jan 16th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.73 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3.  
  4.  
  5. class MainClass
  6. {
  7. static string piege = "";
  8. public static void Main (string[] args) {
  9.  
  10.  
  11. int score = 0;
  12. bool mort = false;
  13. string englais_gauche = "left";
  14. string englais_droite = "right";
  15. string englais_avant = "forward";
  16. bool anticheater = false;
  17. string repcinematique;
  18. bool cinematique = true;
  19.  
  20.  
  21. string[] anticheat = new string[3]
  22. { "gauche", "droite", "avant" };
  23.  
  24. string result1 = string.Join(",", anticheat[0]);
  25. string result2 = string.Join(",", anticheat[1]);
  26. string result3 = string.Join(",", anticheat[2]);
  27.  
  28.  
  29.  
  30.  
  31.  
  32. //Introduction
  33. Console.WriteLine("----------------------------------------------------------------------------------------------\n----------------------------------------------------------------------------------------------\n----------------------------------------------------------------------------------------------\nCRÉÉ PAR MOI ( ͡° ͜ʖ ͡°) ET ALIX. DROIT D'AUTEUR: en_fait_je_me_fou_des_droits_d'auteur_mdr\n----------------------------------------------------------------------------------------------\n----------------------------------------------------------------------------------------------\n----------------------------------------------------------------------------------------------");
  34. System.Threading.Thread.Sleep(4000);
  35. Console.WriteLine("\n\n\nChoisissez votre language / Choose your language: En/Fr");
  36. Console.WriteLine("");
  37. string choix_language = Convert.ToString(Console.ReadLine());
  38. if (choix_language == "fr")
  39. {
  40. Console.WriteLine("Souhaitez-vous passer le tutoriel? (O/N)");
  41. repcinematique = Console.ReadLine();
  42. if (repcinematique == "o")
  43. {
  44. cinematique = false;
  45. }
  46. }
  47. else if (choix_language == "en")
  48. {
  49. Console.WriteLine("Would you like to pass the tutorial? (Y/N)");
  50. repcinematique = Console.ReadLine();
  51. if (repcinematique == "y")
  52. {
  53. cinematique = false;
  54. }
  55. }
  56.  
  57.  
  58. if (cinematique == true)
  59. {
  60. if (choix_language == "fr")
  61. {
  62. Console.WriteLine("Bonjour et bienvenue dans le labyrinthe.");
  63. Console.WriteLine("");
  64. Console.WriteLine("");
  65. Console.WriteLine("Appuyez sur entrer pour continuer.");
  66. Console.ReadLine();
  67.  
  68. Console.WriteLine("Dans celui-ci, vous devrez vous rendre le plus loin possible sans faire face aux pièges !");
  69. Console.WriteLine("");
  70. Console.WriteLine("");
  71. Console.WriteLine("Appuyez sur entrer pour continuer.");
  72. Console.ReadLine();
  73.  
  74. Console.WriteLine("Vous aurez 1 chance sur 4 de tomber sur un piège à chaque chemins que vous prenez.");
  75. Console.WriteLine("");
  76. Console.WriteLine("");
  77. Console.WriteLine("Appuyez sur entrer pour commencer.");
  78. Console.ReadLine();
  79. }
  80. else if (choix_language == "en")
  81. {
  82. Console.WriteLine("Welcome to the maze.");
  83. Console.WriteLine("");
  84. Console.WriteLine("");
  85. Console.WriteLine("Press enter to continue.");
  86. Console.ReadLine();
  87.  
  88. Console.WriteLine("In this maze you’ll have to get the fartest without dying to the traps!");
  89. Console.WriteLine("");
  90. Console.WriteLine("");
  91. Console.WriteLine("Press enter to continue.");
  92. Console.ReadLine();
  93.  
  94. Console.WriteLine("You only have 1 life so be careful!");
  95. System.Threading.Thread.Sleep(1500);
  96. Console.WriteLine("");
  97.  
  98. }
  99. }
  100. //Script Jeu
  101. if (choix_language == "fr")
  102. {
  103. Console.WriteLine("Vous vous réveillez dans un ascenseur en marche.");
  104. Console.WriteLine("");
  105. Console.WriteLine("");
  106. Console.WriteLine("Appuyez sur entrer pour commencer.");
  107. Console.ReadLine();
  108. Console.WriteLine("La porte s'ouvre et vous vous retrouvez dans une grande salle. Celle-ci est dotée de trois grand couloirs, un a gauche, un a droite et un tout-droit.");
  109. System.Threading.Thread.Sleep(5500);
  110. Console.WriteLine("");
  111. Console.WriteLine("Faites attention ! L'un des trois chemins peut contenir un piège.");
  112. Console.WriteLine("");
  113. Console.WriteLine("");
  114. Console.WriteLine("");
  115. Console.WriteLine("");
  116. System.Threading.Thread.Sleep(3200);
  117. Console.WriteLine("(entre gauche, pour aller à gauche, droite, pour aller à droite, ou avant, pour aller en avant.");
  118. }
  119. else if (choix_language == "en")
  120. {
  121.  
  122. result1 = englais_gauche;
  123. result2 = englais_droite;
  124. result3 = englais_avant;
  125. Console.WriteLine("You just woke up in a working elevator.");
  126. Console.WriteLine("");
  127. Console.WriteLine("");
  128. Console.WriteLine("Press enter to continue.");
  129. Console.ReadLine();
  130. Console.WriteLine("The door opens and you walk in a giant room. It has multiple ways: right, left and forward.");
  131. System.Threading.Thread.Sleep(2500);
  132. Console.WriteLine("Some paths might be gathered with traps...");
  133. Console.WriteLine("");
  134. Console.WriteLine("");
  135. Console.WriteLine("(enter left, to go left, right, to go right, or forward, to go forward.");
  136. }
  137. string choix = "";
  138. while (mort == false)
  139. {
  140.  
  141. choix = Convert.ToString(Console.ReadLine());
  142. Random random = new Random();
  143.  
  144. if (choix_language == "fr")
  145. {
  146. var names_fr = new List<string> { "gauche", "droite", "avant" };
  147.  
  148. int index_fr = random.Next(names_fr.Count);
  149. var name_fr = names_fr[index_fr];
  150. names_fr.RemoveAt(index_fr);
  151.  
  152. piege = name_fr;
  153. }
  154. else if (choix_language == "en")
  155. {
  156. var names_en = new List<string> { "left", "right", "forward" };
  157.  
  158. int index_en = random.Next(names_en.Count);
  159. var name_en = names_en[index_en];
  160. names_en.RemoveAt(index_en);
  161.  
  162. piege = name_en;
  163. }
  164.  
  165. if (choix != result1)
  166. if (choix != result2)
  167. if (choix != result3)
  168. if (choix_language == "en")
  169. {
  170. anticheater = true;
  171. Console.WriteLine("Have you tryed to cheat right there? Or was it just a mistake? Please restart the program.");
  172. mort = true;
  173. }
  174. else if (choix_language == "fr")
  175. {
  176. anticheater = true;
  177. Console.WriteLine("Avez-vous essayé de tricher? Ou n'était-ce qu'une erreur? Veuillez redémarrer le programme.");
  178. mort = true;
  179. }
  180.  
  181.  
  182.  
  183.  
  184.  
  185. if (mort != true)
  186. {
  187. if (choix != piege)
  188. {
  189. if (choix_language == "fr")
  190. {
  191. score += 1;
  192. Console.WriteLine("Bravo ! Tu as maintenant " + score + " points.");
  193. System.Threading.Thread.Sleep(1500);
  194. }
  195. else if (choix_language == "en")
  196. {
  197. score += 1;
  198. Console.WriteLine("Great! You now have " + score + " points.");
  199. System.Threading.Thread.Sleep(2000);
  200. }
  201.  
  202. }
  203. }
  204. if (choix == piege)
  205. {
  206. if (anticheater != true)
  207. {
  208. if (choix_language == "fr")
  209. {
  210. mort = true;
  211. Console.WriteLine("Tu est tombé dans le piège, perdu!");
  212. }
  213. else if (choix_language == "en")
  214. {
  215. mort = true;
  216. Console.WriteLine("You fell on a trap, game over !");
  217. }
  218. }
  219. }
  220. }
  221.  
  222. }
  223. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement