Advertisement
saluxx

Finished game

Sep 9th, 2015
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.85 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; //text färg
  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") //om banan är 2, gör det här
  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. else //om banan är någonting annat än 2, gör det här
  72. {
  73. correctanswer = 0;
  74. Console.Write("The Right Answer is 2");
  75. Console.ForegroundColor = ConsoleColor.Yellow;
  76. Console.Write(" Yellow");
  77. Console.ResetColor();
  78. Console.WriteLine();
  79. Console.Write("Your Points: ");
  80. Console.ForegroundColor = ConsoleColor.Magenta;
  81. Console.Write(correctanswer);
  82. Console.ResetColor();
  83. Console.WriteLine();
  84. Console.WriteLine();
  85. Console.WriteLine("Press any button to continue");
  86. }
  87.  
  88. Console.ReadKey();
  89. Console.Clear();
  90.  
  91. Console.ForegroundColor = ConsoleColor.White;
  92. Console.WriteLine("Who created Minecraft?");
  93. Console.WriteLine("1 Adam Persson");
  94. Console.WriteLine("2 Lukas Persson");
  95. Console.WriteLine("3 Markus Persson");
  96. Console.WriteLine("");
  97. Console.ResetColor();
  98. string minecraft = Console.ReadLine();
  99. if (minecraft == "3")
  100. {
  101. correctanswer1 = 1;
  102. Console.WriteLine();
  103. Console.WriteLine("The Right Answer is 3 Markus Persson");
  104. Console.Write("Your Points: ");
  105. Console.ForegroundColor = ConsoleColor.Magenta;
  106. Console.WriteLine(correctanswer + correctanswer1);
  107. Console.ResetColor();
  108. Console.WriteLine();
  109. Console.WriteLine("Press any button to continue");
  110. }
  111. else
  112. {
  113. correctanswer1 = 0;
  114. Console.WriteLine("The Right Answer is 3 Markus Persson");
  115. Console.Write("Your Points: ");
  116. Console.ForegroundColor = ConsoleColor.Magenta;
  117. Console.WriteLine(correctanswer + correctanswer1);
  118. Console.ResetColor();
  119. Console.WriteLine();
  120. Console.WriteLine("Press any button to continue");
  121. }
  122.  
  123. Console.ReadKey();
  124. Console.Clear();
  125.  
  126. Console.ForegroundColor = ConsoleColor.White;
  127. Console.WriteLine("In which continent is Moçambique located?");
  128. Console.WriteLine("1 Africa");
  129. Console.WriteLine("2 Europe");
  130. Console.WriteLine("3 South America");
  131. Console.ResetColor();
  132. Console.WriteLine();
  133. string Mosambik = Console.ReadLine();
  134. if (Mosambik == "1")
  135. {
  136. correctanswer2 = 1;
  137. Console.WriteLine();
  138. Console.WriteLine("The Right Answer is 1 Africa");
  139. Console.Write("Your Points: ");
  140. Console.ForegroundColor = ConsoleColor.Magenta;
  141. Console.WriteLine(correctanswer + correctanswer1 + correctanswer2);
  142. Console.ResetColor();
  143. Console.WriteLine();
  144. Console.WriteLine("Press any button to continue");
  145. }
  146. else
  147. {
  148. correctanswer2 = 0;
  149. Console.WriteLine();
  150. Console.WriteLine("The Right Answer is 1 Africa");
  151. Console.Write("Your Points: ");
  152. Console.ForegroundColor = ConsoleColor.Magenta;
  153. Console.WriteLine(correctanswer + correctanswer1 + correctanswer2);
  154. Console.ResetColor();
  155. Console.WriteLine();
  156. Console.WriteLine("Press any button to continue");
  157. }
  158.  
  159. Console.ReadKey();
  160. Console.Clear();
  161.  
  162. Console.ForegroundColor = ConsoleColor.White;
  163. Console.WriteLine("What color is Cobalt?");
  164. Console.WriteLine("1 Blue");
  165. Console.WriteLine("2 Red");
  166. Console.WriteLine("3 Black");
  167. Console.ResetColor();
  168. Console.WriteLine();
  169. String Cobalt = Console.ReadLine();
  170. if (Cobalt == "1")
  171. {
  172. correctanswer3 = 1;
  173. Console.WriteLine();
  174. Console.Write("The Right Answer is 1 ");
  175. Console.ForegroundColor = ConsoleColor.Blue;
  176. Console.Write("Blue");
  177. Console.ResetColor();
  178. Console.WriteLine();
  179. Console.Write("Your Points: ");
  180. Console.ForegroundColor = ConsoleColor.Magenta;
  181. Console.WriteLine(correctanswer + correctanswer1 + correctanswer2 + correctanswer3); // Press any button hoppar ner ett steg om du har write "line" här
  182. Console.ResetColor();
  183. Console.WriteLine();
  184. Console.WriteLine("Press any button to continue");
  185. }
  186. else
  187. {
  188. correctanswer3 = 0;
  189. Console.WriteLine();
  190. Console.Write("The Right Answer is 1 ");
  191. Console.ForegroundColor = ConsoleColor.Blue;
  192. Console.Write("Blue");
  193. Console.ResetColor();
  194. Console.WriteLine();
  195. Console.Write("Your Points: ");
  196. Console.ForegroundColor = ConsoleColor.Magenta;
  197. Console.WriteLine(correctanswer + correctanswer1 + correctanswer2 + correctanswer3);
  198. Console.ResetColor();
  199. Console.WriteLine();
  200. Console.WriteLine("Press any button to continue");
  201. }
  202.  
  203. Console.ReadKey();
  204. Console.Clear();
  205.  
  206. Console.BackgroundColor = ConsoleColor.Red;
  207. Console.ForegroundColor = ConsoleColor.White;
  208. Console.WriteLine("If u get the last question right you will be rewarded with a bonus question");
  209. Console.WriteLine();
  210. Console.WriteLine("NOTE: The bonus question will give you 3 points");
  211. Console.ResetColor();
  212. Console.WriteLine();
  213. Console.WriteLine("Press any button to continue to the last question...");
  214.  
  215. Console.ReadKey();
  216. Console.Clear();
  217.  
  218. Console.ForegroundColor = ConsoleColor.White;
  219. Console.WriteLine("Which school is the best one in Helsingborg?");
  220. Console.WriteLine("1 IT Gymnasiet");
  221. Console.WriteLine("2 Olympia");
  222. Console.WriteLine("3 LBS");
  223. Console.ResetColor();
  224. Console.WriteLine();
  225. string school = Console.ReadLine();
  226. if (school == "3")
  227. {
  228. correctanswer4 = 1;
  229. Console.WriteLine();
  230. Console.Write("The Right Answer is 3 LBS ");
  231. Console.WriteLine();
  232. Console.Write("Your Points: ");
  233. Console.ForegroundColor = ConsoleColor.Magenta;
  234. Console.WriteLine(correctanswer + correctanswer1 + correctanswer2 + correctanswer3 + correctanswer4);
  235. Console.ResetColor();
  236. Console.WriteLine();
  237. Console.WriteLine("Awesome, you got it right!");
  238. Console.WriteLine("Press any button to continue to the bonus question");
  239. }
  240. else
  241. {
  242. correctanswer4 = 1;
  243. Console.WriteLine();
  244. Console.Write("The Right Answer is 3 LBS ");
  245. Console.WriteLine();
  246. Console.Write("Your Points: ");
  247. Console.ForegroundColor = ConsoleColor.Magenta;
  248. Console.WriteLine(correctanswer + correctanswer1 + correctanswer2 + correctanswer3 + correctanswer4);
  249. Console.ResetColor();
  250. Console.WriteLine();
  251. Console.WriteLine("Press any button to see a full list of your score");
  252.  
  253. Console.ReadKey();
  254. Console.Clear();
  255.  
  256. if (correctanswer == 1)
  257. {
  258. Console.WriteLine("Question number 1 was right = 1 point");
  259. }
  260. else
  261. {
  262. Console.WriteLine("Det är fel");
  263. }
  264. if (correctanswer2 == 1)
  265. {
  266. Console.WriteLine("Question number 1 was right = 1 point");
  267. }
  268. else
  269. {
  270. Console.WriteLine("Question number 1 was wrong = 0 points");
  271. }
  272. if (correctanswer2 == 1)
  273. {
  274. Console.WriteLine("Question number 2 was right = 1 point");
  275. }
  276. else
  277. {
  278. Console.WriteLine("Question number 2 was wrong = 0 points");
  279. }
  280. if (correctanswer3 == 1)
  281. {
  282. Console.WriteLine("Question number 3 was right = 1 point");
  283. }
  284. else
  285. {
  286. Console.WriteLine("Question number 3 was wrong = 0 points");
  287. }
  288. if (correctanswer4 == 1)
  289. {
  290. Console.WriteLine("Question number 4 was right = 1 point");
  291. }
  292. else
  293. {
  294. Console.WriteLine("Question number 4 was wrong = 0 points");
  295. }
  296. Console.WriteLine();
  297. Console.BackgroundColor = ConsoleColor.Red;
  298. Console.ForegroundColor = ConsoleColor.White;
  299. Console.Write("Your final score is: ");
  300. Console.Write(correctanswer + correctanswer1 + correctanswer2 + correctanswer3 + correctanswer4 + correctanswer5);
  301. Console.WriteLine();
  302. Console.WriteLine();
  303. Console.WriteLine("Thanks for the playing the game");
  304. Console.ResetColor();
  305. Console.WriteLine();
  306. Console.WriteLine("Press any button to exit the game...");
  307. System.Environment.Exit(0);
  308. }
  309.  
  310. Console.ReadKey();
  311. Console.Clear();
  312.  
  313. Console.ForegroundColor = ConsoleColor.White;
  314. Console.WriteLine("Which weapon is the Russians favorite weapon in cs");
  315. Console.WriteLine("1 Ak 47");
  316. Console.WriteLine("2 AWP");
  317. Console.WriteLine("3 Knife");
  318. Console.ResetColor();
  319. Console.WriteLine();
  320. string weapon = Console.ReadLine();
  321. if (weapon == "3")
  322. {
  323. correctanswer5 = 3;
  324. Console.WriteLine();
  325. Console.WriteLine("The Right Answer is 3 Knife");
  326. Console.Write("Your Points: ");
  327. Console.ForegroundColor = ConsoleColor.Magenta;
  328. Console.WriteLine(correctanswer + correctanswer1 + correctanswer2 + correctanswer3 + correctanswer4 + correctanswer5);
  329. Console.ResetColor();
  330. Console.WriteLine();
  331. Console.WriteLine("Press any button to see a full list of your score");
  332. }
  333. else
  334. {
  335. correctanswer5 = 0;
  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. Console.ReadKey();
  347. Console.Clear();
  348.  
  349. if (correctanswer == 1)
  350. {
  351. Console.WriteLine("Question number 1 was right = 1 point");
  352. }
  353. else
  354. {
  355. Console.WriteLine("Det är fel");
  356. }
  357. if (correctanswer2 == 1)
  358. {
  359. Console.WriteLine("Question number 1 was right = 1 point");
  360. }
  361. else
  362. {
  363. Console.WriteLine("Question number 1 was wrong = 0 points");
  364. }
  365. if (correctanswer2 == 1)
  366. {
  367. Console.WriteLine("Question number 2 was right = 1 point");
  368. }
  369. else
  370. {
  371. Console.WriteLine("Question number 2 was wrong = 0 points");
  372. }
  373. if (correctanswer3 == 1)
  374. {
  375. Console.WriteLine("Question number 3 was right = 1 point");
  376. }
  377. else
  378. {
  379. Console.WriteLine("Question number 3 was wrong = 0 points");
  380. }
  381. if (correctanswer4 == 1)
  382. {
  383. Console.WriteLine("Question number 4 was right = 1 point");
  384. }
  385. else
  386. {
  387. Console.WriteLine("Question number 4 was wrong = 0 points");
  388. }
  389. if (correctanswer5 == 3)
  390. {
  391. Console.WriteLine("Question number 5 was right = 3 points");
  392. }
  393. else
  394. {
  395. Console.WriteLine("Question number 5 was wrong = 0 points");
  396. }
  397. Console.WriteLine();
  398. Console.BackgroundColor = ConsoleColor.Red;
  399. Console.ForegroundColor = ConsoleColor.White;
  400. Console.Write("Your final score is: ");
  401. Console.Write(correctanswer + correctanswer1 + correctanswer2 + correctanswer3 + correctanswer4 + correctanswer5);
  402. Console.WriteLine();
  403. Console.WriteLine();
  404. Console.WriteLine("Thanks for the playing the game");
  405. Console.ResetColor();
  406. Console.WriteLine();
  407. Console.WriteLine("Press any button twice to exit the game...");
  408.  
  409. Console.ReadKey();
  410. Console.WriteLine();
  411.  
  412. }
  413. }
  414. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement