Advertisement
saluxx

Full game

Sep 9th, 2015
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.83 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 ConsoleApplication9
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int correctanswer = 0;
  14. int correctanswer1 = 0;
  15. int correctanswer2 = 0;
  16. int correctanswer3 = 0;
  17. int correctanswer4 = 0;
  18. int correctanswer5 = 0;
  19. Console.ForegroundColor = ConsoleColor.Green; // Ändra färg
  20. Console.WriteLine("Welcome");
  21. Console.ResetColor(); // Reseta färgen
  22. Console.WriteLine();
  23. Console.ForegroundColor = ConsoleColor.White;
  24. Console.WriteLine("You will be able to see 5 different questions with 3 different options");
  25. Console.WriteLine("type 1,2 or 3 depending on what the answer you believe it is.");
  26. Console.WriteLine();
  27. Console.Write("Correct answer = ");
  28. Console.ForegroundColor = ConsoleColor.Magenta;
  29. Console.Write("1");
  30. Console.ForegroundColor = ConsoleColor.White;
  31. Console.WriteLine(" Point");
  32. Console.WriteLine();
  33. Console.Write("Uncorrect answer = ");
  34. Console.ForegroundColor = ConsoleColor.Magenta;
  35. Console.Write("0");
  36. Console.ForegroundColor = ConsoleColor.White;
  37. Console.Write(" Points");
  38. Console.ResetColor();
  39. Console.WriteLine(); // Hoppar ner 1 rad
  40. Console.WriteLine();
  41. Console.WriteLine("Press any button to start the quiz");
  42.  
  43. Console.ReadKey();
  44. Console.Clear();
  45.  
  46. Console.ForegroundColor = ConsoleColor.White;
  47. Console.WriteLine("What color is a banana?");
  48. Console.WriteLine("1 Black");
  49. Console.WriteLine("2 Yellow");
  50. Console.WriteLine("3 Green");
  51. Console.ResetColor();
  52. Console.WriteLine();
  53. string banan = Console.ReadLine();
  54. if (banan == "2")
  55. {
  56. correctanswer = 1;
  57. Console.WriteLine();
  58. Console.Write("The Right Answer is 2");
  59. Console.ForegroundColor = ConsoleColor.Yellow;
  60. Console.Write(" Yellow");
  61. Console.ResetColor();
  62. Console.WriteLine();
  63. Console.Write("Your Points: ");
  64. Console.ForegroundColor = ConsoleColor.Magenta;
  65. Console.Write(correctanswer);
  66. Console.ResetColor();
  67. Console.WriteLine();
  68. Console.WriteLine();
  69. Console.WriteLine("Press any button to continue");
  70. }
  71.  
  72. else
  73. {
  74. correctanswer = 0;
  75. Console.Write("The Right Answer is 2");
  76. Console.ForegroundColor = ConsoleColor.Yellow;
  77. Console.Write(" Yellow");
  78. Console.ResetColor();
  79. Console.WriteLine();
  80. Console.Write("Your Points: ");
  81. Console.ForegroundColor = ConsoleColor.Magenta;
  82. Console.Write(correctanswer);
  83. Console.ResetColor();
  84. Console.WriteLine();
  85. Console.WriteLine();
  86. Console.WriteLine("Press any button to continue");
  87. }
  88.  
  89. Console.ReadKey();
  90. Console.Clear();
  91.  
  92. Console.ForegroundColor = ConsoleColor.White;
  93. Console.WriteLine("Who created Minecraft?");
  94. Console.WriteLine("1 Adam Persson");
  95. Console.WriteLine("2 Lukas Persson");
  96. Console.WriteLine("3 Markus Persson");
  97. Console.WriteLine("");
  98. Console.ResetColor();
  99. string minecraft = Console.ReadLine();
  100. if (minecraft == "3")
  101. {
  102. correctanswer1 = 1;
  103. Console.WriteLine();
  104. Console.WriteLine("The Right Answer is 3 Markus Persson");
  105. Console.Write("Your Points: ");
  106. Console.ForegroundColor = ConsoleColor.Magenta;
  107. Console.WriteLine(correctanswer + correctanswer1);
  108. Console.ResetColor();
  109. Console.WriteLine();
  110. Console.WriteLine("Press any button to continue");
  111. }
  112.  
  113. else
  114. {
  115. correctanswer1 = 0;
  116. Console.WriteLine("The Right Answer is 3 Markus Persson");
  117. Console.Write("Your Points: ");
  118. Console.ForegroundColor = ConsoleColor.Magenta;
  119. Console.WriteLine(correctanswer + correctanswer1);
  120. Console.ResetColor();
  121. Console.WriteLine();
  122. Console.WriteLine("Press any button to continue");
  123. }
  124. Console.ReadKey();
  125. Console.Clear();
  126.  
  127. Console.ForegroundColor = ConsoleColor.White;
  128. Console.WriteLine("In which continent is Moçambique located?");
  129. Console.WriteLine("1 Africa");
  130. Console.WriteLine("2 Europe");
  131. Console.WriteLine("3 South America");
  132. Console.ResetColor();
  133. Console.WriteLine();
  134. string Mosambik = Console.ReadLine();
  135. if (Mosambik == "1")
  136. {
  137. correctanswer2 = 1;
  138. Console.WriteLine();
  139. Console.WriteLine("The Right Answer is 1 Africa");
  140. Console.Write("Your Points: ");
  141. Console.ForegroundColor = ConsoleColor.Magenta;
  142. Console.WriteLine(correctanswer + correctanswer1 + correctanswer2);
  143. Console.ResetColor();
  144. Console.WriteLine();
  145. Console.WriteLine("Press any button to continue");
  146.  
  147. }
  148.  
  149. else
  150. {
  151. correctanswer2 = 0;
  152. Console.WriteLine();
  153. Console.WriteLine("The Right Answer is 1 Africa");
  154. Console.Write("Your Points: ");
  155. Console.ForegroundColor = ConsoleColor.Magenta;
  156. Console.WriteLine(correctanswer + correctanswer1 + correctanswer2);
  157. Console.ResetColor();
  158. Console.WriteLine();
  159. Console.WriteLine("Press any button to continue");
  160. }
  161.  
  162. Console.ReadKey();
  163. Console.Clear();
  164.  
  165. Console.ForegroundColor = ConsoleColor.White;
  166. Console.WriteLine("What color is Cobalt?");
  167. Console.WriteLine("1 Blue");
  168. Console.WriteLine("2 Red");
  169. Console.WriteLine("3 Black");
  170. Console.ResetColor();
  171. Console.WriteLine();
  172. String Cobalt = Console.ReadLine();
  173. if (Cobalt == "1")
  174. {
  175. correctanswer3 = 1;
  176. Console.WriteLine();
  177. Console.Write("The Right Answer is 1 ");
  178. Console.ForegroundColor = ConsoleColor.Blue;
  179. Console.Write("Blue");
  180. Console.ResetColor();
  181. Console.WriteLine();
  182. Console.Write("Your Points: ");
  183. Console.ForegroundColor = ConsoleColor.Magenta;
  184. Console.WriteLine(correctanswer + correctanswer1 + correctanswer2 + correctanswer3); // Press any button hoppar ner ett steg om du har write "line" här
  185. Console.ResetColor();
  186. Console.WriteLine();
  187. Console.WriteLine("Press any button to continue");
  188.  
  189. }
  190.  
  191. else
  192. {
  193. correctanswer3 = 0;
  194. Console.WriteLine();
  195. Console.Write("The Right Answer is 1 ");
  196. Console.ForegroundColor = ConsoleColor.Blue;
  197. Console.Write("Blue");
  198. Console.ResetColor();
  199. Console.WriteLine();
  200. Console.Write("Your Points: ");
  201. Console.ForegroundColor = ConsoleColor.Magenta;
  202. Console.WriteLine(correctanswer + correctanswer1 + correctanswer2 + correctanswer3);
  203. Console.ResetColor();
  204. Console.WriteLine();
  205. Console.WriteLine("Press any button to continue");
  206.  
  207. }
  208.  
  209. Console.ReadKey();
  210. Console.Clear();
  211.  
  212. Console.BackgroundColor = ConsoleColor.Red;
  213. Console.ForegroundColor = ConsoleColor.White;
  214. Console.WriteLine("If u get the last question right you will be rewarded with a bonus question");
  215. Console.WriteLine();
  216. Console.WriteLine("NOTE: The bonus question will give you 3 points");
  217. Console.ResetColor();
  218. Console.WriteLine();
  219. Console.WriteLine("Press any button to continue to the last question...");
  220.  
  221. Console.ReadKey();
  222. Console.Clear();
  223.  
  224. Console.ForegroundColor = ConsoleColor.White;
  225. Console.WriteLine("What school is the best in Helsingborg?");
  226. Console.WriteLine("1 IT Gymnasiet");
  227. Console.WriteLine("2 Olympia");
  228. Console.WriteLine("3 LBS");
  229. Console.ResetColor();
  230. Console.WriteLine();
  231. string school = Console.ReadLine();
  232. if (school == "3")
  233. {
  234. correctanswer4 = 1;
  235. Console.WriteLine();
  236. Console.Write("The Right Answer is 3 LBS ");
  237. Console.WriteLine();
  238. Console.Write("Your Points: ");
  239. Console.ForegroundColor = ConsoleColor.Magenta;
  240. Console.WriteLine(correctanswer + correctanswer1 + correctanswer2 + correctanswer3 + correctanswer4);
  241. Console.ResetColor();
  242. Console.WriteLine();
  243. Console.WriteLine("Awesome, you got it right!");
  244. Console.WriteLine("Press any button to continue to the bonus question");
  245.  
  246. }
  247.  
  248. else
  249.  
  250. {
  251.  
  252. correctanswer4 = 1;
  253. Console.WriteLine();
  254. Console.Write("The Right Answer is 3 LBS ");
  255. Console.WriteLine();
  256. Console.Write("Your Points: ");
  257. Console.ForegroundColor = ConsoleColor.Magenta;
  258. Console.WriteLine(correctanswer + correctanswer1 + correctanswer2 + correctanswer3 + correctanswer4);
  259. Console.ResetColor();
  260. Console.WriteLine();
  261. Console.WriteLine("Press any button to see a full list of your score");
  262.  
  263. Console.ReadKey();
  264. Console.Clear();
  265.  
  266. if (correctanswer == 1)
  267. {
  268. Console.WriteLine("Question number 1 was right = 1 point");
  269. }
  270. else
  271. {
  272. Console.WriteLine("Det är fel");
  273. }
  274. if (correctanswer2 == 1)
  275. {
  276. Console.WriteLine("Question number 1 was right = 1 point");
  277. }
  278. else
  279. {
  280. Console.WriteLine("Question number 1 was wrong = 0 points");
  281. }
  282. if (correctanswer2 == 1)
  283. {
  284. Console.WriteLine("Question number 2 was right = 1 point");
  285. }
  286. else
  287. {
  288. Console.WriteLine("Question number 2 was wrong = 0 points");
  289. }
  290. if (correctanswer3 == 1)
  291. {
  292. Console.WriteLine("Question number 3 was right = 1 point");
  293. }
  294. else
  295. {
  296. Console.WriteLine("Question number 3 was wrong = 0 points");
  297. }
  298. if (correctanswer4 == 1)
  299. {
  300. Console.WriteLine("Question number 4 was right = 1 point");
  301. }
  302. else
  303. {
  304. Console.WriteLine("Question number 4 was wrong = 0 points");
  305. }
  306.  
  307. Console.WriteLine();
  308. Console.BackgroundColor = ConsoleColor.Red;
  309. Console.ForegroundColor = ConsoleColor.White;
  310. Console.Write("Your final score is: ");
  311. Console.Write(correctanswer + correctanswer1 + correctanswer2 + correctanswer3 + correctanswer4 + correctanswer5);
  312. Console.WriteLine();
  313. Console.WriteLine();
  314. Console.WriteLine("Thanks for the playing the game");
  315. Console.ResetColor();
  316. Console.WriteLine();
  317. Console.WriteLine("Press any button to exit the game...");
  318. System.Environment.Exit(0);
  319.  
  320. }
  321.  
  322. Console.ReadKey();
  323. Console.Clear();
  324.  
  325. Console.ForegroundColor = ConsoleColor.White;
  326. Console.WriteLine("Which weapon is the Russians favorite weapon in cs");
  327. Console.WriteLine("1 Ak 47");
  328. Console.WriteLine("2 AWP");
  329. Console.WriteLine("3 Knife");
  330. Console.ResetColor();
  331. Console.WriteLine();
  332. string weapon = Console.ReadLine();
  333. if (weapon == "3")
  334. {
  335. correctanswer5 = 3;
  336. Console.WriteLine();
  337. Console.WriteLine("The Right Answer is 3 Knife");
  338. Console.Write("Your Points: ");
  339. Console.ForegroundColor = ConsoleColor.Magenta;
  340. Console.WriteLine(correctanswer + correctanswer1 + correctanswer2 + correctanswer3 + correctanswer4 + correctanswer5);
  341. Console.ResetColor();
  342. Console.WriteLine();
  343. Console.WriteLine("Press any button to see a full list of your score");
  344. }
  345.  
  346. else
  347.  
  348. {
  349.  
  350. correctanswer5 = 0;
  351. Console.WriteLine();
  352. Console.WriteLine("The Right Answer is 3 Knife");
  353. Console.Write("Your Points: ");
  354. Console.ForegroundColor = ConsoleColor.Magenta;
  355. Console.WriteLine(correctanswer + correctanswer1 + correctanswer2 + correctanswer3 + correctanswer4 + correctanswer5);
  356. Console.ResetColor();
  357. Console.WriteLine();
  358. Console.WriteLine("Press any button to see a full list of your score");
  359.  
  360. }
  361.  
  362. Console.ReadKey();
  363. Console.Clear();
  364.  
  365. if (correctanswer == 1)
  366. {
  367. Console.WriteLine("Question number 1 was right = 1 point");
  368. }
  369. else
  370. {
  371. Console.WriteLine("Det är fel");
  372. }
  373. if (correctanswer2 == 1)
  374. {
  375. Console.WriteLine("Question number 1 was right = 1 point");
  376. }
  377. else
  378. {
  379. Console.WriteLine("Question number 1 was wrong = 0 points");
  380. }
  381. if (correctanswer2 == 1)
  382. {
  383. Console.WriteLine("Question number 2 was right = 1 point");
  384. }
  385. else
  386. {
  387. Console.WriteLine("Question number 2 was wrong = 0 points");
  388. }
  389. if (correctanswer3 == 1)
  390. {
  391. Console.WriteLine("Question number 3 was right = 1 point");
  392. }
  393. else
  394. {
  395. Console.WriteLine("Question number 3 was wrong = 0 points");
  396. }
  397. if (correctanswer4 == 1)
  398. {
  399. Console.WriteLine("Question number 4 was right = 1 point");
  400. }
  401. else
  402. {
  403. Console.WriteLine("Question number 4 was wrong = 0 points");
  404. }
  405. if (correctanswer5 == 3)
  406. {
  407. Console.WriteLine("Question number 5 was right = 3 points");
  408. }
  409. else
  410. {
  411. Console.WriteLine("Question number 5 was wrong = 0 points");
  412. }
  413.  
  414. Console.WriteLine();
  415. Console.BackgroundColor = ConsoleColor.Red;
  416. Console.ForegroundColor = ConsoleColor.White;
  417. Console.Write("Your final score is: ");
  418. Console.Write(correctanswer + correctanswer1 + correctanswer2 + correctanswer3 + correctanswer4 + correctanswer5);
  419. Console.WriteLine();
  420. Console.WriteLine();
  421. Console.WriteLine("Thanks for the playing the game");
  422. Console.ResetColor();
  423. Console.WriteLine();
  424. Console.WriteLine("Press any button twice to exit the game...");
  425.  
  426.  
  427.  
  428. Console.ReadKey();
  429. Console.WriteLine();
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448. }
  449. }
  450. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement