nelltbe

FINALLY FUCK THIS COURSE

Nov 20th, 2019
348
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 51.37 KB | None | 0 0
  1. #include <stdio.h>
  2. #include "gfx.h"
  3. #include <stdlib.h>
  4. #include <time.h>
  5.  
  6. int score_add(int score1);
  7. int guess_minus(int guess1);
  8.  
  9. int main()
  10.  
  11. { //146
  12. char c,n;
  13. int x,y,score,guess;
  14.  
  15. char *test = "Would you like to play a game? Y/N" ;
  16. char *start = "Press the Y button to start LEVEL 1";
  17. char *starttwo = "Press any button to start LEVEL 2";
  18. char *startthree = "Press any button to start LEVEL 3";
  19.  
  20. char *a = "A";
  21. char *b = "B";
  22. char *cc = "C";
  23. char *d = "D";
  24. char *e = "E";
  25. char *f = "F";
  26. char *g = "G";
  27. char *h = "H";
  28. char *i = "I";
  29. char *j = "J";
  30. char *k = "K";
  31. char *l = "L";
  32.  
  33. char *stagethree = "WELCOME TO LEVEL THREE";
  34.  
  35. char *instruct = "INSTRUCTIONS";
  36. char *instructone = "1. Use your mouse to click on the correct color";
  37. char *instructtwo = "2. If you do not have a mouse, press the character on the keyboard following said character on the screen";
  38. char *instructthre = "3. You have 3 guesses, picking the wrong color 3 times would mean game over";
  39. char *final = "4. The high score is 5 so do your best yeaa";
  40.  
  41. char *levelone = "LEVEL 1-1";
  42. char *leveltwo = "LEVEL 1-2";
  43. char *levelthree = "LEVEL 1-3";
  44. char *levelfour = "LEVEL 1-4";
  45. char *levelfive = "LEVEL 1-5";
  46.  
  47. char *leveltwoone = "LEVEL 2-1";
  48. char *leveltwotwo = "LEVEL 2-2";
  49. char *leveltwothree = "LEVEL 2-3";
  50. char *leveltwofour = "LEVEL 2-4";
  51. char *leveltwofive = "LEVEL 2-5";
  52.  
  53. char *levelthreeone = "LEVEL 3-1";
  54.  
  55. char *finalone = "CONGRATULATIONS! THIS IS THE FINAL STAGE";
  56. char *finaltwo = "THERE IS ONLY ONE QUESTION, BUT IT IS THE HARDEST ONE";
  57. char *finalfinal = "YOU HAVE COMPLETED THE GAME! GOOD JOB!";
  58.  
  59. char *congratsone = "CONGRATULATIONS you have completed level 1";
  60. char *congratstwo = "CONGRATULATIONS you have completed level 2";
  61.  
  62. char *between = "Left click the mouse or press any key to continue";
  63. char *finish = "Press any button to quit";
  64. char *next = "Press any button to go to the next page";
  65. char *nexttwo = "Press any button to go to LEVEL 2";
  66.  
  67. char *red = "RED";
  68. char *lblue = "LIGHT BLUE";
  69. char *dblue = "DARK BLUE";
  70. char *yellow = "YELLOW";
  71. char *dgreen = "DARK GREEN";
  72. char *lgreen = "LIGHT GREEN";
  73. char *brown = "BROWN";
  74. char *purple ="PURPLE";
  75. char *pink = "PINK";
  76. char *black = "BLACK";
  77. char *grey = "GREY";
  78. char *cyan = "CYAN";
  79.  
  80. char *correct = "CORRECT";
  81. char *wrong = "WRONG";
  82.  
  83. char *guessone = "You have 1 guesses left";
  84. char *guesstwo = "You have 2 guesses left";
  85. char *guessthree = "You have 3 guesses left";
  86.  
  87. char *scorezero = "SCORE = 0";
  88. char *scoreone = "SCORE = 1";
  89. char *scoretwo = "SCORE = 2";
  90. char *scorethree = "SCORE = 3";
  91. char *scorefour = "SCORE = 4";
  92. char *scorefive = "SCORE = 5";
  93.  
  94. char *whitetrapez = "WHITE TRAPEZIUM";
  95.  
  96. char *end = "Okay, Please come again!";
  97. char *end1 = "Press any key to exit";
  98. char *gg = "You have 0 guesses left.";
  99. char *gameover = "GAME OVER";
  100.  
  101. guess = 3;
  102. score = 0;
  103.  
  104. gfx_open(3000,1000,"COLOR MATCHING GAME YAYY");
  105. gfx_clear_color(255,255,255);
  106. gfx_clear();
  107.  
  108. gfx_color(0,0,0);
  109. gfx_text(test,800,500);
  110.  
  111. c = gfx_wait();
  112. gfx_clear();
  113.  
  114. gfx_text(instruct,50,50);
  115. gfx_text(instructone,50,100);
  116. gfx_text(instructtwo,50,150);
  117. gfx_text(instructthre,50,200);
  118. gfx_text(final,50,250);
  119. gfx_text(next,50,300);
  120.  
  121. c = gfx_wait();
  122. gfx_clear();
  123.  
  124. while (1) {//143
  125.  
  126. x = gfx_xpos();
  127. y = gfx_ypos();
  128.  
  129. if ((c =='Y') || (c == 'y'))
  130. {//165
  131. gfx_clear(); //level one start (125 - 241)
  132. gfx_text(start,800,500);
  133. c = gfx_wait();
  134. gfx_clear();
  135. gfx_text(levelone,1100,100);
  136. gfx_text(red,100,100);
  137. gfx_text(scorezero,100,200);
  138. gfx_text(guessthree,100,300);
  139.  
  140. // setting line color
  141. gfx_color(0,0,0);
  142.  
  143. //drawing vertical grid
  144. gfx_line(600,0,600,1000);
  145. gfx_line(800,0,800,1000);
  146. gfx_line(1000,0,1000,1000);
  147.  
  148. //drawing horizontal grid
  149. gfx_line(600,200,1000,200);
  150. gfx_line(600,400,1000,400);
  151. gfx_line(600,600,1000,600);
  152. gfx_line(600,800,1000,800);
  153. gfx_line(600,1000,1000,1000);
  154.  
  155. // drawing in circles with different colors
  156.  
  157. gfx_color(0,0,0); //black
  158. gfx_fillcircle(700,100,150);
  159.  
  160. gfx_color(255,0,0); //red
  161. gfx_fillcircle(900,100,150);
  162.  
  163. gfx_color(0,255,0); //light green
  164. gfx_fillcircle(700,300,150);
  165.  
  166. gfx_color(0,0,255); //light blue
  167. gfx_fillcircle(900,300,150);
  168.  
  169. gfx_color(255,255,0); //yellow
  170. gfx_fillcircle(700,500,150);
  171.  
  172. gfx_color(0,128,0); //dark green
  173. gfx_fillcircle(900,500,150);
  174.  
  175. gfx_color(255,0,255); //pink
  176. gfx_fillcircle(700,700,150);
  177.  
  178. gfx_color(128,0,128); //purple
  179. gfx_fillcircle(900,700,150);
  180.  
  181. gfx_color(0,0,100); //dark blue
  182. gfx_fillcircle(700,900,150);
  183.  
  184. gfx_color(204,102,0); //brown
  185. gfx_fillcircle(900,900,150);
  186.  
  187. //Letter in circle
  188. gfx_color(0,0,0);
  189.  
  190. gfx_text(a,610,102);
  191.  
  192. gfx_text(b,810,102);
  193.  
  194. gfx_text(cc,610,302);
  195.  
  196. gfx_text(d,810,302);
  197.  
  198. gfx_text(e,610,502);
  199.  
  200. gfx_text(f,810,502);
  201.  
  202. gfx_text(g,610,702);
  203.  
  204. gfx_text(h,810,702);
  205.  
  206. gfx_text(i,610,902);
  207.  
  208. gfx_text(j,810,902);
  209.  
  210. c = gfx_wait();
  211.  
  212. if ( c == 'b' || (x >= 800 && x <= 1000) && (y >= 0 && y <= 200)) // correct decision
  213. {//140
  214. score = score_add(score);
  215. gfx_clear();
  216. gfx_text(correct,800,300);
  217. gfx_text(scoreone,800,400);
  218. gfx_text(guessthree,800,450);
  219. gfx_text(between,800,500);
  220. //printf("%d\n",score);
  221. c = gfx_wait();
  222. gfx_clear();
  223. }//136
  224.  
  225. else // wrong decision
  226. {//163
  227. guess = guess_minus(guess);
  228. gfx_clear();
  229. gfx_text(wrong,800,300);
  230. gfx_text(scorezero,800,400);
  231. gfx_text(guesstwo,800,450);
  232. gfx_text(between,800,500);
  233. //printf("%d\n",guess);
  234. c = gfx_wait();
  235. gfx_clear();
  236. }//155
  237.  
  238. if (score == 1)
  239. {
  240. gfx_text(guessthree,100,250);
  241. gfx_text(scoreone,100,200);
  242. }
  243.  
  244. if (guess == 2)
  245. {
  246. gfx_text(guesstwo,100,250);
  247. gfx_text(scorezero,100,200);
  248. } //level one end (125 - 241)
  249.  
  250. gfx_text(leveltwo,1100,100);//level two start (244 - 391)
  251. gfx_text(lblue,100,100);
  252.  
  253. // setting line color
  254. gfx_color(0,0,0);
  255.  
  256. //drawing vertical grid
  257. gfx_line(600,0,600,1000);
  258. gfx_line(800,0,800,1000);
  259. gfx_line(1000,0,1000,1000);
  260.  
  261. //drawing horizontal grid
  262. gfx_line(600,200,1000,200);
  263. gfx_line(600,400,1000,400);
  264. gfx_line(600,600,1000,600);
  265. gfx_line(600,800,1000,800);
  266. gfx_line(600,1000,1000,1000);
  267.  
  268. // drawing in circles with different colors
  269.  
  270. gfx_color(255,0,255); //pink
  271. gfx_fillcircle(700,100,150);
  272.  
  273. gfx_color(255,255,0); //yellow
  274. gfx_fillcircle(900,100,150);
  275.  
  276. gfx_color(255,0,0); //red
  277. gfx_fillcircle(700,300,150);
  278.  
  279. gfx_color(0,0,100); //dark blue
  280. gfx_fillcircle(900,300,150);
  281.  
  282. gfx_color(204,102,0); //brown
  283. gfx_fillcircle(700,500,150);
  284.  
  285. gfx_color(0,128,0); //dark green
  286. gfx_fillcircle(900,500,150);
  287.  
  288. gfx_color(0,0,0); //black
  289. gfx_fillcircle(700,700,150);
  290.  
  291. gfx_color(0,255,0); //light green
  292. gfx_fillcircle(900,700,150);
  293.  
  294. gfx_color(0,0,255); //light blue
  295. gfx_fillcircle(700,900,150);
  296.  
  297. gfx_color(128,0,128); //purple
  298. gfx_fillcircle(900,900,150);
  299.  
  300. //Letter in circle
  301. gfx_color(0,0,0);
  302.  
  303. gfx_text(a,610,102);
  304.  
  305. gfx_text(b,810,102);
  306.  
  307. gfx_text(cc,610,302);
  308.  
  309. gfx_text(d,810,302);
  310.  
  311. gfx_text(e,610,502);
  312.  
  313. gfx_text(f,810,502);
  314.  
  315. gfx_text(g,610,702);
  316.  
  317. gfx_text(h,810,702);
  318.  
  319. gfx_text(i,610,902);
  320.  
  321. gfx_text(j,810,902);
  322.  
  323. c = gfx_wait();
  324. gfx_color(0,0,0);
  325.  
  326. if (c == 'i' || (gfx_xpos() >= 600 && gfx_xpos() <= 800) && (gfx_ypos() >= 800 && gfx_ypos() <= 1000)) // correct condition
  327. {//347
  328. score = score_add(score);
  329. if (score == 2)
  330. {//334
  331. gfx_clear();
  332. gfx_text(correct,800,300);
  333. gfx_text(scoretwo,800,400);
  334. gfx_text(guessthree,800,450);
  335. gfx_text(between,800,500);
  336. //printf("%d\n",score);
  337. x = gfx_wait();
  338. gfx_clear();
  339. }//325
  340.  
  341. else if (score == 1)
  342. {//346
  343. gfx_clear();
  344. gfx_text(correct,800,300);
  345. gfx_text(scoreone,800,400);
  346. gfx_text(guesstwo,800,450);
  347. gfx_text(between,800,500);
  348. //printf("%d\n",score);
  349. c = gfx_wait();
  350. gfx_clear();
  351. }//337
  352. }//322
  353.  
  354. else//wrong condition
  355. {//375
  356. guess = guess_minus(guess);
  357. if (guess == 2)
  358. {//361
  359. gfx_clear();
  360. gfx_text(wrong,800,300);
  361. gfx_text(scoreone,800,400);
  362. gfx_text(guesstwo,800,450);
  363. gfx_text(between,800,500);
  364. //printf("%d\n",guess);
  365. c = gfx_wait();
  366. gfx_clear();
  367. }//353
  368.  
  369. else if(guess == 1)
  370. {//374
  371. gfx_clear();
  372. gfx_text(wrong,800,300);
  373. gfx_text(scorezero,800,400);
  374. gfx_text(guessone,800,450);
  375. gfx_text(between,800,500);
  376. //printf("%d\n",guess);
  377. c = gfx_wait();
  378. gfx_clear();
  379. }//365
  380. }//350
  381.  
  382. if (score == 2)
  383. {
  384. gfx_text(guessthree,100,250);
  385. gfx_text(scoretwo,100,200);
  386. }
  387. if (score == 1)
  388. {
  389. gfx_text(guesstwo,100,250);
  390. gfx_text(scoreone,100,200);
  391. }
  392. if (score == 0)
  393. {
  394. gfx_text(guessone,100,250);
  395. gfx_text(scorezero,100,200);
  396. }//level two end (244-391)
  397.  
  398. gfx_text(levelthree,1100,100);//level three (392 - 561)
  399. gfx_text(black,100,100);
  400.  
  401. // setting line color
  402. gfx_color(0,0,0);
  403.  
  404. //drawing vertical grid
  405. gfx_line(600,0,600,1000);
  406. gfx_line(800,0,800,1000);
  407. gfx_line(1000,0,1000,1000);
  408.  
  409. //drawing horizontal grid
  410. gfx_line(600,200,1000,200);
  411. gfx_line(600,400,1000,400);
  412. gfx_line(600,600,1000,600);
  413. gfx_line(600,800,1000,800);
  414. gfx_line(600,1000,1000,1000);
  415.  
  416. // drawing in circles with different colors
  417.  
  418. gfx_color(0,0,255); //light blue
  419. gfx_fillcircle(700,100,150);
  420.  
  421. gfx_color(255,0,255); //pink
  422. gfx_fillcircle(900,100,150);
  423.  
  424. gfx_color(0,0,100); //dark blue
  425. gfx_fillcircle(700,300,150);
  426.  
  427. gfx_color(0,255,0); //light green
  428. gfx_fillcircle(900,300,150);
  429.  
  430. gfx_color(204,102,0); //brown
  431. gfx_fillcircle(700,500,150);
  432.  
  433. gfx_color(0,0,0); //black
  434. gfx_fillcircle(900,500,150);
  435.  
  436. gfx_color(0,128,0); //dark green
  437. gfx_fillcircle(700,700,150);
  438.  
  439. gfx_color(128,0,128); //purple
  440. gfx_fillcircle(900,700,150);
  441.  
  442. gfx_color(255,0,0); //red
  443. gfx_fillcircle(700,900,150);
  444.  
  445. gfx_color(255,255,0); //yellow
  446. gfx_fillcircle(900,900,150);
  447.  
  448. //Letter in circle
  449. gfx_color(0,0,0);
  450.  
  451. gfx_text(a,610,102);
  452.  
  453. gfx_text(b,810,102);
  454.  
  455. gfx_text(cc,610,302);
  456.  
  457. gfx_text(d,810,302);
  458.  
  459. gfx_text(e,610,502);
  460.  
  461. gfx_text(f,810,502);
  462.  
  463. gfx_text(g,610,702);
  464.  
  465. gfx_text(h,810,702);
  466.  
  467. gfx_text(i,610,902);
  468.  
  469. gfx_text(j,810,902);
  470.  
  471. c = gfx_wait();
  472. gfx_color(0,0,0);
  473.  
  474. if (c == 'f' || (gfx_xpos() >= 800 && gfx_xpos() <= 1000) && (gfx_ypos() >= 400 && gfx_ypos() <= 600)) // correct condition
  475. {// 506
  476. score = score_add(score);
  477. if (score == 3)
  478. {//481
  479. gfx_clear();
  480. gfx_text(correct,800,300);
  481. gfx_text(scorethree,800,400);
  482. gfx_text(guessthree,800,450);
  483. gfx_text(between,800,500);
  484. //printf("%d\n",score);
  485. c = gfx_wait();
  486. gfx_clear();
  487. }//472
  488.  
  489. else if (score == 2)
  490. {//493
  491. gfx_clear();
  492. gfx_text(correct,800,300);
  493. gfx_text(scoretwo,800,400);
  494. gfx_text(guesstwo,800,450);
  495. gfx_text(between,800,500);
  496. //printf("%d\n",score);
  497. c = gfx_wait();
  498. gfx_clear();
  499. }//484
  500.  
  501. else if (score == 1)
  502. {//505
  503. gfx_clear();
  504. gfx_text(correct,800,300);
  505. gfx_text(scoreone,800,400);
  506. gfx_text(guessone,800,450);
  507. gfx_text(between,800,500);
  508. //printf("%d\n",score);
  509. c = gfx_wait();
  510. gfx_clear();
  511. }//496
  512. }//469
  513.  
  514. else//wrong condition
  515. {//545
  516. guess = guess_minus(guess);
  517. if (guess == 2)
  518. {//521
  519. gfx_clear();
  520. gfx_text(wrong,800,300);
  521. gfx_text(scoretwo,800,400);
  522. gfx_text(guesstwo,800,450);
  523. gfx_text(between,800,500);
  524. //printf("%d\n",guess);
  525. c = gfx_wait();
  526. gfx_clear();
  527. }//512
  528.  
  529. else if(guess == 1)
  530. {//533
  531. gfx_clear();
  532. gfx_text(wrong,800,300);
  533. gfx_text(scoreone,800,400);
  534. gfx_text(guessone,800,450);
  535. gfx_text(between,800,500);
  536. //printf("%d\n",guess);
  537. c = gfx_wait();
  538. gfx_clear();
  539. }//524
  540.  
  541. else if (guess == 0)
  542. {//544
  543. gfx_clear();
  544. gfx_text(wrong,800,300);
  545. gfx_text(gg,800,350);
  546. gfx_text(gameover,800,400);
  547. gfx_text(finish,800,450);
  548. c = gfx_wait();
  549. break;
  550. }//536
  551. }//509
  552.  
  553. if (score == 3)
  554. {
  555. gfx_text(guessthree,100,250);
  556. gfx_text(scorethree,100,200);
  557. }
  558. if (score == 2)
  559. {
  560. gfx_text(guesstwo,100,250);
  561. gfx_text(scoretwo,100,200);
  562. }
  563. if (score == 1)
  564. {
  565. gfx_text(guessone,100,250);
  566. gfx_text(scoreone,100,200);
  567. }//level three end(392 - 561)
  568.  
  569. gfx_text(levelfour,1100,100);//level four start (563 -731)
  570. gfx_text(lgreen,100,100);
  571.  
  572. // setting line color
  573. gfx_color(0,0,0);
  574.  
  575. //drawing vertical grid
  576. gfx_line(600,0,600,1000);
  577. gfx_line(800,0,800,1000);
  578. gfx_line(1000,0,1000,1000);
  579.  
  580. //drawing horizontal grid
  581. gfx_line(600,200,1000,200);
  582. gfx_line(600,400,1000,400);
  583. gfx_line(600,600,1000,600);
  584. gfx_line(600,800,1000,800);
  585. gfx_line(600,1000,1000,1000);
  586.  
  587. // drawing in circles with different colors
  588.  
  589. gfx_color(255,255,0); //yellow
  590. gfx_fillcircle(700,100,150);
  591.  
  592. gfx_color(0,0,0); //black
  593. gfx_fillcircle(900,100,150);
  594.  
  595. gfx_color(0,0,100); //dark blue
  596. gfx_fillcircle(700,300,150);
  597.  
  598. gfx_color(128,0,128); //purple
  599. gfx_fillcircle(900,300,150);
  600.  
  601. gfx_color(204,102,0); //brown
  602. gfx_fillcircle(700,500,150);
  603.  
  604. gfx_color(255,0,255); //pink
  605. gfx_fillcircle(900,500,150);
  606.  
  607. gfx_color(0,128,0); //dark green
  608. gfx_fillcircle(700,700,150);
  609.  
  610. gfx_color(0,255,0); //light green
  611. gfx_fillcircle(900,700,150);
  612.  
  613. gfx_color(0,0,255); //light blue
  614. gfx_fillcircle(700,900,150);
  615.  
  616. gfx_color(255,0,0); //red
  617. gfx_fillcircle(900,900,150);
  618.  
  619. //Letter in circle
  620. gfx_color(0,0,0);
  621.  
  622. gfx_text(a,610,102);
  623.  
  624. gfx_text(b,810,102);
  625.  
  626. gfx_text(cc,610,302);
  627.  
  628. gfx_text(d,810,302);
  629.  
  630. gfx_text(e,610,502);
  631.  
  632. gfx_text(f,810,502);
  633.  
  634. gfx_text(g,610,702);
  635.  
  636. gfx_text(h,810,702);
  637.  
  638. gfx_text(i,610,902);
  639.  
  640. gfx_text(j,810,902);
  641.  
  642. c = gfx_wait();
  643. gfx_color(0,0,0);
  644.  
  645. if (c == 'h' || (gfx_xpos() >= 800 && gfx_xpos() <= 1000) && (gfx_ypos() >= 600 && gfx_ypos() <= 800)) // correct condition
  646. {//677
  647. score = score_add(score);
  648. if (score == 4)
  649. {//653
  650. gfx_clear();
  651. gfx_text(correct,800,300);
  652. gfx_text(scorefour,800,400);
  653. gfx_text(guessthree,800,450);
  654. gfx_text(between,800,500);
  655. //printf("%d\n",score);
  656. c = gfx_wait();
  657. gfx_clear();
  658. }//643
  659.  
  660. else if (score == 3)
  661. {//655
  662. gfx_clear();
  663. gfx_text(correct,800,300);
  664. gfx_text(scorethree,800,400);
  665. gfx_text(guesstwo,800,450);
  666. gfx_text(between,800,500);
  667. //printf("%d\n",score);
  668. c = gfx_wait();
  669. gfx_clear();
  670. }//664
  671.  
  672. else if (score == 2)
  673. {//676
  674. gfx_clear();
  675. gfx_text(correct,800,300);
  676. gfx_text(scoretwo,800,400);
  677. gfx_text(guessone,800,450);
  678. gfx_text(between,800,500);
  679. //printf("%d\n",score);
  680. c = gfx_wait();
  681. gfx_clear();
  682. }//667
  683. }//640
  684.  
  685. else
  686. {//716
  687. guess = guess_minus(guess);
  688. if (guess == 2)
  689. {//692
  690. gfx_clear();
  691. gfx_text(wrong,800,300);
  692. gfx_text(scorethree,800,400);
  693. gfx_text(guesstwo,800,450);
  694. gfx_text(between,800,500);
  695. //printf("%d\n",guess);
  696. c = gfx_wait();
  697. gfx_clear();
  698. }//683
  699.  
  700. if (guess == 1)
  701. {//704
  702. gfx_clear();
  703. gfx_text(wrong,800,300);
  704. gfx_text(scoretwo,800,400);
  705. gfx_text(guessone,800,450);
  706. gfx_text(between,800,500);
  707. //printf("%d\n",guess);
  708. c = gfx_wait();
  709. gfx_clear();
  710. }//695
  711.  
  712. if (guess == 0)
  713. {//715
  714. gfx_clear();
  715. gfx_text(wrong,800,300);
  716. gfx_text(gg,800,350);
  717. gfx_text(gameover,800,400);
  718. gfx_text(finish,800,450);
  719. c = gfx_wait();
  720. break;
  721. }//707
  722. }//680
  723. if (score == 4)
  724. {
  725. gfx_text(guessthree,100,250);
  726. gfx_text(scorefour,100,200);
  727. }
  728. if (score == 3)
  729. {
  730. gfx_text(guesstwo,100,250);
  731. gfx_text(scorethree,100,200);
  732. }
  733. if (score == 2)
  734. {
  735. gfx_text(guessone,100,250);
  736. gfx_text(scoretwo,100,200);
  737. }// level four end (563 - 731)
  738.  
  739. gfx_text(levelfive,1100,100);//level five start (733 -
  740. gfx_text(yellow,100,100);
  741.  
  742. // setting line color
  743. gfx_color(0,0,0);
  744.  
  745. //drawing vertical grid
  746. gfx_line(600,0,600,1000);
  747. gfx_line(800,0,800,1000);
  748. gfx_line(1000,0,1000,1000);
  749.  
  750. //drawing horizontal grid
  751. gfx_line(600,200,1000,200);
  752. gfx_line(600,400,1000,400);
  753. gfx_line(600,600,1000,600);
  754. gfx_line(600,800,1000,800);
  755. gfx_line(600,1000,1000,1000);
  756.  
  757. // drawing in circles with different colors
  758.  
  759. gfx_color(128,0,128); //purple
  760. gfx_fillcircle(700,100,150);
  761.  
  762. gfx_color(0,0,255); //light blue
  763. gfx_fillcircle(900,100,150);
  764.  
  765. gfx_color(255,255,0); //yellow
  766. gfx_fillcircle(700,300,150);
  767.  
  768. gfx_color(0,0,100); //dark blue
  769. gfx_fillcircle(900,300,150);
  770.  
  771. gfx_color(204,102,0); //brown
  772. gfx_fillcircle(700,500,150);
  773.  
  774. gfx_color(255,0,255); //pink
  775. gfx_fillcircle(900,500,150);
  776.  
  777. gfx_color(0,128,0); //dark green
  778. gfx_fillcircle(700,700,150);
  779.  
  780. gfx_color(255,0,0); //red
  781. gfx_fillcircle(900,700,150);
  782.  
  783. gfx_color(0,255,0); //light green
  784. gfx_fillcircle(700,900,150);
  785.  
  786. gfx_color(0,0,0); //black
  787. gfx_fillcircle(900,900,150);
  788.  
  789. //Letter in circle
  790. gfx_color(0,0,0);
  791.  
  792. gfx_text(a,610,102);
  793.  
  794. gfx_text(b,810,102);
  795.  
  796. gfx_text(cc,610,302);
  797.  
  798. gfx_text(d,810,302);
  799.  
  800. gfx_text(e,610,502);
  801.  
  802. gfx_text(f,810,502);
  803.  
  804. gfx_text(g,610,702);
  805.  
  806. gfx_text(h,810,702);
  807.  
  808. gfx_text(i,610,902);
  809.  
  810. gfx_text(j,810,902);
  811.  
  812. c = gfx_wait();
  813. gfx_color(0,0,0);
  814.  
  815. if (c == 'c' || (gfx_xpos() >= 600 && gfx_xpos() <= 800) && (gfx_ypos() >= 200 && gfx_ypos() <= 400)) // correct condition
  816. {
  817. score = score_add(score);
  818. if (score == 5)
  819. {//140
  820. gfx_clear();
  821. gfx_text(correct,800,300);
  822. gfx_text(scorefive,800,400);
  823. gfx_text(guessthree,800,450);
  824. //printf("%d\n",score);
  825. c = gfx_wait();
  826. gfx_clear();
  827. }//136
  828.  
  829. if (score == 4)
  830. {//140
  831. gfx_clear();
  832. gfx_text(correct,800,300);
  833. gfx_text(scorefour,800,400);
  834. gfx_text(guesstwo,800,450);
  835. //printf("%d\n",score);
  836. c = gfx_wait();
  837. gfx_clear();
  838. }//136
  839.  
  840. if (score == 3)
  841. {//140
  842. gfx_clear();
  843. gfx_text(correct,800,300);
  844. gfx_text(scorethree,800,400);
  845. gfx_text(guessone,800,450);
  846. //printf("%d\n",score);
  847. c = gfx_wait();
  848. gfx_clear();
  849. }//136
  850.  
  851. }
  852. else
  853. {
  854. guess = guess_minus(guess);
  855.  
  856. if (guess == 2)
  857. {
  858. gfx_clear();
  859. gfx_text(wrong,800,300);
  860. gfx_text(scorefour,800,400);
  861. gfx_text(guesstwo,800,450);
  862. gfx_text(between,800,500);
  863. //printf("%d\n",guess);
  864. c = gfx_wait();
  865. gfx_clear();
  866. }
  867.  
  868. if (guess == 1)
  869. {
  870. gfx_clear();
  871. gfx_text(wrong,800,300);
  872. gfx_text(scorethree,800,400);
  873. gfx_text(guessone,800,450);
  874. gfx_text(between,800,500);
  875. //printf("%d\n",guess);
  876. c = gfx_wait();
  877. gfx_clear();
  878. }
  879.  
  880. if (guess == 0)
  881. {
  882. gfx_clear();
  883. gfx_text(wrong,800,300);
  884. gfx_text(gg,800,350);
  885. gfx_text(gameover,800,400);
  886. gfx_text(finish,800,450);
  887. c = gfx_wait();
  888. break;
  889. }
  890. }
  891. if (score == 5)
  892. {
  893. gfx_text(scorefive,100,200);
  894. gfx_text(nexttwo,100,100);
  895. }
  896.  
  897. if (score == 4)
  898. {
  899. gfx_text(scorefour,100,200);
  900. gfx_text(nexttwo,100,100);
  901. }
  902. if (score == 3)
  903. {
  904. gfx_text(scorethree,100,200);
  905. gfx_text(nexttwo,100,100);
  906. }
  907.  
  908. c = gfx_wait();
  909.  
  910. score = 0;
  911. guess = 3;
  912.  
  913. //level one(91 - 183)
  914. gfx_clear();
  915. gfx_text(starttwo,800,500);
  916. c = gfx_wait();
  917. gfx_clear();
  918. gfx_color(0,0,0);
  919. gfx_text(leveltwoone,1100,100);
  920. gfx_text(grey,100,100);
  921. gfx_text(scorezero,100,200);
  922. gfx_text(guessthree,100,300);
  923.  
  924. // setting line color
  925. gfx_color(0,0,0);
  926.  
  927. //drawing vertical grid
  928. gfx_line(600,0,600,800);
  929. gfx_line(800,0,800,800);
  930. gfx_line(1000,0,1000,800);
  931. gfx_line(1200,0,1200,800);
  932.  
  933. //drawing horizontal grid
  934. gfx_line(600,200,1200,200);
  935. gfx_line(600,400,1200,400);
  936. gfx_line(600,600,1200,600);
  937. gfx_line(600,800,1200,800);
  938.  
  939. // drawing in circles with different colors
  940.  
  941. gfx_color(0,0,0); //black
  942. gfx_fillcircle(700,100,150);
  943.  
  944. gfx_color(255,0,0); //red
  945. gfx_fillcircle(900,100,150);
  946.  
  947. gfx_color(0,255,0); //light green
  948. gfx_fillcircle(700,300,150);
  949.  
  950. gfx_color(0,0,255); //light blue
  951. gfx_fillcircle(900,300,150);
  952.  
  953. gfx_color(255,255,0); //yellow
  954. gfx_fillcircle(700,500,150);
  955.  
  956. gfx_color(0,128,0); //dark green
  957. gfx_fillcircle(900,500,150);
  958.  
  959. gfx_color(255,0,255); //pink
  960. gfx_fillcircle(700,700,150);
  961.  
  962. gfx_color(128,0,128); //purple
  963. gfx_fillcircle(900,700,150);
  964.  
  965. gfx_color(0,0,100); //dark blue
  966. gfx_fillcircle(1100,100,150);
  967.  
  968. gfx_color(0,255,255); //cyan
  969. gfx_fillcircle(1100,300,150);
  970.  
  971. gfx_color(204,102,0); //brown
  972. gfx_fillcircle(1100,500,150);
  973.  
  974. gfx_color(112,128,144); //grey
  975. gfx_fillcircle(1100,700,150);
  976.  
  977. //Letter in circle
  978. gfx_color(0,0,0);
  979.  
  980. gfx_text(a,610,102);
  981.  
  982. gfx_text(b,810,102);
  983.  
  984. gfx_text(cc,1010,102);
  985.  
  986. gfx_text(d,610,302);
  987.  
  988. gfx_text(e,810,302);
  989.  
  990. gfx_text(f,1010,302);
  991.  
  992. gfx_text(g,610,502);
  993.  
  994. gfx_text(h,810,502);
  995.  
  996. gfx_text(i,1010,502);
  997.  
  998. gfx_text(j,610,702);
  999.  
  1000. gfx_text(k,810,702);
  1001.  
  1002. gfx_text(l,1010,702);
  1003.  
  1004. c = gfx_wait();
  1005.  
  1006.  
  1007.  
  1008. if (c == 'l' || (x >= 1000 && x <= 1200) && (y >= 600 && y <= 800)) // correct decision
  1009. {//140
  1010. score = score_add(score);
  1011. gfx_clear();
  1012. gfx_text(correct,800,300);
  1013. gfx_text(scoreone,800,400);
  1014. gfx_text(guessthree,800,450);
  1015. gfx_text(between,800,500);
  1016. //printf("%d\n",score);
  1017. c = gfx_wait();
  1018. gfx_clear();
  1019. }//136
  1020.  
  1021. else // wrong decision
  1022. {//163
  1023. guess = guess_minus(guess);
  1024. gfx_clear();
  1025. gfx_text(wrong,800,300);
  1026. gfx_text(scorezero,800,400);
  1027. gfx_text(guesstwo,800,450);
  1028. gfx_text(between,800,500);
  1029. //printf("%d\n",guess);
  1030. c = gfx_wait();
  1031. gfx_clear();
  1032. }//155
  1033.  
  1034. if (score == 1)
  1035. {
  1036. gfx_text(guessthree,100,250);
  1037. gfx_text(scoreone,100,200);
  1038. }
  1039. if (guess == 2)
  1040. {
  1041. gfx_text(guesstwo,100,250);
  1042. gfx_text(scorezero,100,200);
  1043. }
  1044.  
  1045. //level two(186 - 295)
  1046. gfx_text(leveltwotwo,1100,100);
  1047. gfx_text(purple,100,100);
  1048.  
  1049. // setting line color
  1050. gfx_color(0,0,0);
  1051.  
  1052. //drawing vertical grid
  1053. gfx_line(600,0,600,800);
  1054. gfx_line(800,0,800,800);
  1055. gfx_line(1000,0,1000,800);
  1056. gfx_line(1200,0,1200,800);
  1057.  
  1058. //drawing horizontal grid
  1059. gfx_line(600,200,1200,200);
  1060. gfx_line(600,400,1200,400);
  1061. gfx_line(600,600,1200,600);
  1062. gfx_line(600,800,1200,800);
  1063.  
  1064. // drawing in circles with different colors
  1065.  
  1066. gfx_color(255,0,0); //red
  1067. gfx_fillcircle(700,100,150);
  1068.  
  1069. gfx_color(255,255,0); //yellow
  1070. gfx_fillcircle(900,100,150);
  1071.  
  1072. gfx_color(0,0,255); //light blue
  1073. gfx_fillcircle(700,300,150);
  1074.  
  1075. gfx_color(0,255,0); //light green
  1076. gfx_fillcircle(900,300,150);
  1077.  
  1078. gfx_color(0,0,0); //black
  1079. gfx_fillcircle(700,500,150);
  1080.  
  1081. gfx_color(0,0,100); //dark green
  1082. gfx_fillcircle(900,500,150);
  1083.  
  1084. gfx_color(255,0,255); //pink
  1085. gfx_fillcircle(700,700,150);
  1086.  
  1087. gfx_color(128,0,128); //purple
  1088. gfx_fillcircle(900,700,150);
  1089.  
  1090. gfx_color(0,128,0); //dark blue
  1091. gfx_fillcircle(1100,100,150);
  1092.  
  1093. gfx_color(112,128,144); //grey
  1094. gfx_fillcircle(1100,300,150);
  1095.  
  1096. gfx_color(204,102,0); //brown
  1097. gfx_fillcircle(1100,500,150);
  1098.  
  1099. gfx_color(0,255,255); //cyan
  1100. gfx_fillcircle(1100,700,150);
  1101.  
  1102. //Letter in circle
  1103. gfx_color(0,0,0);
  1104.  
  1105. gfx_text(a,610,102);
  1106.  
  1107. gfx_text(b,810,102);
  1108.  
  1109. gfx_text(cc,1010,102);
  1110.  
  1111. gfx_text(d,610,302);
  1112.  
  1113. gfx_text(e,810,302);
  1114.  
  1115. gfx_text(f,1010,302);
  1116.  
  1117. gfx_text(g,610,502);
  1118.  
  1119. gfx_text(h,810,502);
  1120.  
  1121. gfx_text(i,1010,502);
  1122.  
  1123. gfx_text(j,610,702);
  1124.  
  1125. gfx_text(k,810,702);
  1126.  
  1127. gfx_text(l,1010,702);
  1128.  
  1129. c = gfx_wait();
  1130. gfx_color(0,0,0);
  1131.  
  1132. if (c == 'k' || (gfx_xpos() >= 800 && gfx_xpos() <= 1000) && (gfx_ypos() >= 600 && gfx_ypos() <= 900)) // correct condition
  1133. {
  1134. score = score_add(score);
  1135. if (score == 2)
  1136. {//140
  1137. gfx_clear();
  1138. gfx_text(correct,800,300);
  1139. gfx_text(scoretwo,800,400);
  1140. gfx_text(guessthree,800,450);
  1141. gfx_text(between,800,500);
  1142. //printf("%d\n",score);
  1143. x = gfx_wait();
  1144. gfx_clear();
  1145. }//136
  1146.  
  1147. else if (score == 1)
  1148. {//140
  1149. gfx_clear();
  1150. gfx_text(correct,800,300);
  1151. gfx_text(scoreone,800,400);
  1152. gfx_text(guesstwo,800,450);
  1153. gfx_text(between,800,500);
  1154. //printf("%d\n",score);
  1155. c = gfx_wait();
  1156. gfx_clear();
  1157. }//136
  1158. }
  1159.  
  1160. else//wrong condition
  1161. {//163
  1162. guess = guess_minus(guess);
  1163. if (guess == 2)
  1164. {
  1165. gfx_clear();
  1166. gfx_text(wrong,800,300);
  1167. gfx_text(scoreone,800,400);
  1168. gfx_text(guesstwo,800,450);
  1169. gfx_text(between,800,500);
  1170. //printf("%d\n",guess);
  1171. c = gfx_wait();
  1172. gfx_clear();
  1173. }//155
  1174.  
  1175. else if(guess == 1)
  1176. {
  1177. gfx_clear();
  1178. gfx_text(wrong,800,300);
  1179. gfx_text(scorezero,800,400);
  1180. gfx_text(guessone,800,450);
  1181. gfx_text(between,800,500);
  1182. //printf("%d\n",guess);
  1183. c = gfx_wait();
  1184. gfx_clear();
  1185. }//155
  1186. }
  1187.  
  1188. if (score == 2)
  1189. {
  1190. gfx_text(guessthree,100,250);
  1191. gfx_text(scoretwo,100,200);
  1192. }
  1193. if (score == 1)
  1194. {
  1195. gfx_text(guesstwo,100,250);
  1196. gfx_text(scoreone,100,200);
  1197. }
  1198. if (score == 0)
  1199. {
  1200. gfx_text(guessone,100,250);
  1201. gfx_text(scorezero,100,200);
  1202. }
  1203.  
  1204. gfx_text(leveltwothree,1100,100);//level three (313 -
  1205. gfx_text(lgreen,100,100);
  1206.  
  1207. // setting line color
  1208. gfx_color(0,0,0);
  1209.  
  1210. //drawing vertical grid
  1211. gfx_line(600,0,600,800);
  1212. gfx_line(800,0,800,800);
  1213. gfx_line(1000,0,1000,800);
  1214. gfx_line(1200,0,1200,800);
  1215.  
  1216. //drawing horizontal grid
  1217. gfx_line(600,200,1200,200);
  1218. gfx_line(600,400,1200,400);
  1219. gfx_line(600,600,1200,600);
  1220. gfx_line(600,800,1200,800);
  1221.  
  1222. // drawing in circles with different colors
  1223.  
  1224. gfx_color(0,0,255); //light blue
  1225. gfx_fillcircle(700,100,150);
  1226.  
  1227. gfx_color(255,0,0); //red
  1228. gfx_fillcircle(900,100,150);
  1229.  
  1230. gfx_color(0,128,0); //dark green
  1231. gfx_fillcircle(700,300,150);
  1232.  
  1233. gfx_color(0,0,0); //black
  1234. gfx_fillcircle(900,300,150);
  1235.  
  1236. gfx_color(255,255,0); //yellow
  1237. gfx_fillcircle(700,500,150);
  1238.  
  1239. gfx_color(0,255,255); //cyan
  1240. gfx_fillcircle(900,500,150);
  1241.  
  1242. gfx_color(112,128,144); //grey
  1243. gfx_fillcircle(700,700,150);
  1244.  
  1245. gfx_color(128,0,128); //purple
  1246. gfx_fillcircle(900,700,150);
  1247.  
  1248. gfx_color(204,102,0); //brown
  1249. gfx_fillcircle(1100,100,150);
  1250.  
  1251. gfx_color(0,0,100); //dark blue
  1252. gfx_fillcircle(1100,300,150);
  1253.  
  1254. gfx_color(0,255,0); //light green
  1255. gfx_fillcircle(1100,500,150);
  1256.  
  1257. gfx_color(255,0,255); //pink
  1258. gfx_fillcircle(1100,700,150);
  1259.  
  1260. //Letter in circle
  1261. gfx_color(0,0,0);
  1262.  
  1263. gfx_text(a,610,102);
  1264.  
  1265. gfx_text(b,810,102);
  1266.  
  1267. gfx_text(cc,1010,102);
  1268.  
  1269. gfx_text(d,610,302);
  1270.  
  1271. gfx_text(e,810,302);
  1272.  
  1273. gfx_text(f,1010,302);
  1274.  
  1275. gfx_text(g,610,502);
  1276.  
  1277. gfx_text(h,810,502);
  1278.  
  1279. gfx_text(i,1010,502);
  1280.  
  1281. gfx_text(j,610,702);
  1282.  
  1283. gfx_text(k,810,702);
  1284.  
  1285. gfx_text(l,1010,702);
  1286.  
  1287. c = gfx_wait();
  1288. gfx_color(0,0,0);
  1289.  
  1290. if (c == 'i' || (gfx_xpos() >= 1000 && gfx_xpos() <= 1200) && (gfx_ypos() >= 400 && gfx_ypos() <= 600)) // correct condition
  1291. {
  1292. score = score_add(score);
  1293. if (score == 3)
  1294. {//140
  1295. gfx_clear();
  1296. gfx_text(correct,800,300);
  1297. gfx_text(scorethree,800,400);
  1298. gfx_text(guessthree,800,450);
  1299. gfx_text(between,800,500);
  1300. //printf("%d\n",score);
  1301. c = gfx_wait();
  1302. gfx_clear();
  1303. }//136
  1304.  
  1305. else if (score == 2)
  1306. {//140
  1307. gfx_clear();
  1308. gfx_text(correct,800,300);
  1309. gfx_text(scoretwo,800,400);
  1310. gfx_text(guesstwo,800,450);
  1311. gfx_text(between,800,500);
  1312. //printf("%d\n",score);
  1313. c = gfx_wait();
  1314. gfx_clear();
  1315. }//136
  1316.  
  1317. else if (score == 1)
  1318. {//140
  1319. gfx_clear();
  1320. gfx_text(correct,800,300);
  1321. gfx_text(scoreone,800,400);
  1322. gfx_text(guessone,800,450);
  1323. gfx_text(between,800,500);
  1324. //printf("%d\n",score);
  1325. c = gfx_wait();
  1326. gfx_clear();
  1327. }//136
  1328. }
  1329.  
  1330. else//wrong condition
  1331. {//163
  1332. guess = guess_minus(guess);
  1333. if (guess == 2)
  1334. {
  1335. gfx_clear();
  1336. gfx_text(wrong,800,300);
  1337. gfx_text(scoretwo,800,400);
  1338. gfx_text(guesstwo,800,450);
  1339. gfx_text(between,800,500);
  1340. //printf("%d\n",guess);
  1341. c = gfx_wait();
  1342. gfx_clear();
  1343. }//155
  1344.  
  1345. else if(guess == 1)
  1346. {
  1347. gfx_clear();
  1348. gfx_text(wrong,800,300);
  1349. gfx_text(scoreone,800,400);
  1350. gfx_text(guessone,800,450);
  1351. gfx_text(between,800,500);
  1352. //printf("%d\n",guess);
  1353. c = gfx_wait();
  1354. gfx_clear();
  1355. }//155
  1356.  
  1357. else if (guess == 0)
  1358. {
  1359. gfx_clear();
  1360. gfx_text(wrong,800,300);
  1361. gfx_text(gg,800,350);
  1362. gfx_text(gameover,800,400);
  1363. gfx_text(finish,800,450);
  1364. c = gfx_wait();
  1365. break;
  1366. }
  1367. }//66
  1368.  
  1369. if (score == 3)
  1370. {
  1371. gfx_text(guessthree,100,250);
  1372. gfx_text(scorethree,100,200);
  1373. }
  1374. if (score == 2)
  1375. {
  1376. gfx_text(guesstwo,100,250);
  1377. gfx_text(scoretwo,100,200);
  1378. }
  1379. if (score == 1)
  1380. {
  1381. gfx_text(guessone,100,250);
  1382. gfx_text(scoreone,100,200);
  1383. }
  1384.  
  1385. gfx_text(leveltwofour,1100,100);//level four
  1386. gfx_text(dblue,100,100);
  1387.  
  1388. // setting line color
  1389. gfx_color(0,0,0);
  1390.  
  1391. //drawing vertical grid
  1392. gfx_line(600,0,600,800);
  1393. gfx_line(800,0,800,800);
  1394. gfx_line(1000,0,1000,800);
  1395. gfx_line(1200,0,1200,800);
  1396.  
  1397. //drawing horizontal grid
  1398. gfx_line(600,200,1200,200);
  1399. gfx_line(600,400,1200,400);
  1400. gfx_line(600,600,1200,600);
  1401. gfx_line(600,800,1200,800);
  1402.  
  1403. // drawing in circles with different colors
  1404.  
  1405. gfx_color(112,128,144); //grey
  1406. gfx_fillcircle(700,100,150);
  1407.  
  1408. gfx_color(255,0,0); //red
  1409. gfx_fillcircle(900,100,150);
  1410.  
  1411. gfx_color(0,0,0); //black
  1412. gfx_fillcircle(700,300,150);
  1413.  
  1414. gfx_color(0,0,255); //light blue
  1415. gfx_fillcircle(900,300,150);
  1416.  
  1417. gfx_color(0,255,255); //cyan
  1418. gfx_fillcircle(700,500,150);
  1419.  
  1420. gfx_color(0,128,0); //dark green
  1421. gfx_fillcircle(900,500,150);
  1422.  
  1423. gfx_color(255,0,255); //pink
  1424. gfx_fillcircle(700,700,150);
  1425.  
  1426. gfx_color(128,0,128); //purple
  1427. gfx_fillcircle(900,700,150);
  1428.  
  1429. gfx_color(0,255,0); //light green
  1430. gfx_fillcircle(1100,100,150);
  1431.  
  1432. gfx_color(255,255,0); //yellow
  1433. gfx_fillcircle(1100,300,150);
  1434.  
  1435. gfx_color(0,0,100); //dark blue
  1436. gfx_fillcircle(1100,500,150);
  1437.  
  1438. gfx_color(204,102,0); //brown
  1439. gfx_fillcircle(1100,700,150);
  1440.  
  1441. //Letter in circle
  1442. gfx_color(0,0,0);
  1443.  
  1444. gfx_text(a,610,102);
  1445.  
  1446. gfx_text(b,810,102);
  1447.  
  1448. gfx_text(cc,1010,102);
  1449.  
  1450. gfx_text(d,610,302);
  1451.  
  1452. gfx_text(e,810,302);
  1453.  
  1454. gfx_text(f,1010,302);
  1455.  
  1456. gfx_text(g,610,502);
  1457.  
  1458. gfx_text(h,810,502);
  1459.  
  1460. gfx_text(i,1010,502);
  1461.  
  1462. gfx_text(j,610,702);
  1463.  
  1464. gfx_text(k,810,702);
  1465.  
  1466. gfx_text(l,1010,702);
  1467.  
  1468. c = gfx_wait();
  1469. gfx_color(0,0,0);
  1470.  
  1471. if (c == 'i' || (gfx_xpos() >= 1000 && gfx_xpos() <= 1200) && (gfx_ypos() >= 400 && gfx_ypos() <= 600)) // correct condition
  1472. {
  1473. score = score_add(score);
  1474. if (score == 4)
  1475. {//140
  1476. gfx_clear();
  1477. gfx_text(correct,800,300);
  1478. gfx_text(scorefour,800,400);
  1479. gfx_text(guessthree,800,450);
  1480. gfx_text(between,800,500);
  1481. //printf("%d\n",score);
  1482. c = gfx_wait();
  1483. gfx_clear();
  1484. }//136
  1485.  
  1486. else if (score == 3)
  1487. {//140
  1488. gfx_clear();
  1489. gfx_text(correct,800,300);
  1490. gfx_text(scorethree,800,400);
  1491. gfx_text(guesstwo,800,450);
  1492. gfx_text(between,800,500);
  1493. //printf("%d\n",score);
  1494. c = gfx_wait();
  1495. gfx_clear();
  1496. }//136
  1497.  
  1498. else if (score == 2)
  1499. {//140
  1500. gfx_clear();
  1501. gfx_text(correct,800,300);
  1502. gfx_text(scoretwo,800,400);
  1503. gfx_text(guessone,800,450);
  1504. gfx_text(between,800,500);
  1505. //printf("%d\n",score);
  1506. c = gfx_wait();
  1507. gfx_clear();
  1508. }//136
  1509. }
  1510.  
  1511. else
  1512. {
  1513. guess = guess_minus(guess);
  1514. if (guess == 2)
  1515. {
  1516. gfx_clear();
  1517. gfx_text(wrong,800,300);
  1518. gfx_text(scorethree,800,400);
  1519. gfx_text(guesstwo,800,450);
  1520. gfx_text(between,800,500);
  1521. //printf("%d\n",guess);
  1522. c = gfx_wait();
  1523. gfx_clear();
  1524. }
  1525.  
  1526. if (guess == 1)
  1527. {
  1528. gfx_clear();
  1529. gfx_text(wrong,800,300);
  1530. gfx_text(scoretwo,800,400);
  1531. gfx_text(guessone,800,450);
  1532. gfx_text(between,800,500);
  1533. //printf("%d\n",guess);
  1534. c = gfx_wait();
  1535. gfx_clear();
  1536. }
  1537.  
  1538. if (guess == 0)
  1539. {
  1540. gfx_clear();
  1541. gfx_text(wrong,800,300);
  1542. gfx_text(gg,800,350);
  1543. gfx_text(gameover,800,400);
  1544. gfx_text(finish,800,450);
  1545. c = gfx_wait();
  1546. break;
  1547. }
  1548. }
  1549. if (score == 4)
  1550. {
  1551. gfx_text(guessthree,100,250);
  1552. gfx_text(scorefour,100,200);
  1553. }
  1554. if (score == 3)
  1555. {
  1556. gfx_text(guesstwo,100,250);
  1557. gfx_text(scorethree,100,200);
  1558. }
  1559. if (score == 2)
  1560. {
  1561. gfx_text(guessone,100,250);
  1562. gfx_text(scoretwo,100,200);
  1563. }
  1564.  
  1565. gfx_text(leveltwofive,1100,100);//level five
  1566. gfx_text(pink,100,100);
  1567.  
  1568. // setting line color
  1569. gfx_color(0,0,0);
  1570.  
  1571. //drawing vertical grid
  1572. gfx_line(600,0,600,800);
  1573. gfx_line(800,0,800,800);
  1574. gfx_line(1000,0,1000,800);
  1575. gfx_line(1200,0,1200,800);
  1576.  
  1577. //drawing horizontal grid
  1578. gfx_line(600,200,1200,200);
  1579. gfx_line(600,400,1200,400);
  1580. gfx_line(600,600,1200,600);
  1581. gfx_line(600,800,1200,800);
  1582.  
  1583. // drawing in circles with different colors
  1584.  
  1585. gfx_color(255,0,255); //pink
  1586. gfx_fillcircle(700,100,150);
  1587.  
  1588. gfx_color(0,255,0); //light green
  1589. gfx_fillcircle(900,100,150);
  1590.  
  1591. gfx_color(0,0,255); //light blue
  1592. gfx_fillcircle(700,300,150);
  1593.  
  1594. gfx_color(255,0,0); //red
  1595. gfx_fillcircle(900,300,150);
  1596.  
  1597. gfx_color(255,255,0); //yellow
  1598. gfx_fillcircle(700,500,150);
  1599.  
  1600. gfx_color(0,128,0); //dark green
  1601. gfx_fillcircle(900,500,150);
  1602.  
  1603. gfx_color(0,0,0); //black
  1604. gfx_fillcircle(700,700,150);
  1605.  
  1606. gfx_color(0,255,255); //cyan
  1607. gfx_fillcircle(900,700,150);
  1608.  
  1609. gfx_color(0,0,100); //dark blue
  1610. gfx_fillcircle(1100,100,150);
  1611.  
  1612. gfx_color(128,0,128); //purple
  1613. gfx_fillcircle(1100,300,150);
  1614.  
  1615. gfx_color(112,128,144); //grey
  1616. gfx_fillcircle(1100,500,150);
  1617.  
  1618. gfx_color(204,102,0); //brown
  1619. gfx_fillcircle(1100,700,150);
  1620.  
  1621. //Letter in circle
  1622. gfx_color(0,0,0);
  1623.  
  1624. gfx_text(a,610,102);
  1625.  
  1626. gfx_text(b,810,102);
  1627.  
  1628. gfx_text(cc,1010,102);
  1629.  
  1630. gfx_text(d,610,302);
  1631.  
  1632. gfx_text(e,810,302);
  1633.  
  1634. gfx_text(f,1010,302);
  1635.  
  1636. gfx_text(g,610,502);
  1637.  
  1638. gfx_text(h,810,502);
  1639.  
  1640. gfx_text(i,1010,502);
  1641.  
  1642. gfx_text(j,610,702);
  1643.  
  1644. gfx_text(k,810,702);
  1645.  
  1646. gfx_text(l,1010,702);
  1647.  
  1648. c = gfx_wait();
  1649. gfx_color(0,0,0);
  1650.  
  1651. if (c == 'a' || (gfx_xpos() >= 600 && gfx_xpos() <= 800) && (gfx_ypos() >= 0 && gfx_ypos() <= 200)) // correct condition
  1652. {
  1653. score = score_add(score);
  1654. if (score == 5)
  1655. {//140
  1656. gfx_clear();
  1657. gfx_text(correct,800,300);
  1658. gfx_text(scorefive,800,400);
  1659. gfx_text(guessthree,800,450);
  1660. gfx_text(between,800,500);
  1661. //printf("%d\n",score);
  1662. c = gfx_wait();
  1663. gfx_clear();
  1664. }//136
  1665.  
  1666. if (score == 4)
  1667. {//140
  1668. gfx_clear();
  1669. gfx_text(correct,800,300);
  1670. gfx_text(scorefour,800,400);
  1671. gfx_text(guesstwo,800,450);
  1672. gfx_text(between,800,500);
  1673. //printf("%d\n",score);
  1674. c = gfx_wait();
  1675. gfx_clear();
  1676. }//136
  1677.  
  1678. if (score == 3)
  1679. {//140
  1680. gfx_clear();
  1681. gfx_text(correct,800,300);
  1682. gfx_text(scorethree,800,400);
  1683. gfx_text(guessone,800,450);
  1684. gfx_text(between,800,500);
  1685. //printf("%d\n",score);
  1686. c = gfx_wait();
  1687. gfx_clear();
  1688. }//136
  1689.  
  1690. }
  1691. else
  1692. {
  1693. guess = guess_minus(guess);
  1694.  
  1695. if (guess == 2)
  1696. {
  1697. gfx_clear();
  1698. gfx_text(wrong,800,300);
  1699. gfx_text(scorefour,800,400);
  1700. gfx_text(guesstwo,800,450);
  1701. gfx_text(between,800,500);
  1702. //printf("%d\n",guess);
  1703. c = gfx_wait();
  1704. gfx_clear();
  1705. }
  1706.  
  1707. if (guess == 1)
  1708. {
  1709. gfx_clear();
  1710. gfx_text(wrong,800,300);
  1711. gfx_text(scorethree,800,400);
  1712. gfx_text(guessone,800,450);
  1713. gfx_text(between,800,500);
  1714. //printf("%d\n",guess);
  1715. c = gfx_wait();
  1716. gfx_clear();
  1717. }
  1718.  
  1719. if (guess == 0)
  1720. {
  1721. gfx_clear();
  1722. gfx_text(wrong,800,300);
  1723. gfx_text(gg,800,350);
  1724. gfx_text(gameover,800,400);
  1725. gfx_text(finish,800,450);
  1726. c = gfx_wait();
  1727. break;
  1728. }
  1729. }
  1730. gfx_text(congratstwo,100,100);
  1731. if (score == 5)
  1732. {
  1733. gfx_text(scorefive,100,200);
  1734. }
  1735.  
  1736. if (score == 4)
  1737. {
  1738. gfx_text(scorefour,100,200);
  1739. }
  1740. if (score == 3)
  1741. {
  1742. gfx_text(scorethree,100,200);
  1743. }
  1744. gfx_text(startthree,100,150);
  1745. c = gfx_wait();
  1746.  
  1747. guess = 1;
  1748. score = 0;
  1749.  
  1750. gfx_open(3000,1000,"bew");
  1751. gfx_clear_color(0,0,0);
  1752. gfx_clear();
  1753.  
  1754. gfx_color(255,255,255);
  1755. gfx_text(stagethree,800,500);
  1756. gfx_text(between,800,550);
  1757. c = gfx_wait();
  1758. gfx_clear();
  1759.  
  1760. gfx_text(finalone,800,500);
  1761. gfx_text(finaltwo,800,550);
  1762. c = gfx_wait();
  1763. gfx_clear();
  1764.  
  1765. gfx_color(255,255,255);
  1766. gfx_text(levelthreeone,1300,100);
  1767. gfx_text(whitetrapez,100,100);
  1768. gfx_text(scorezero,100,200);
  1769. gfx_text(guessone,100,300);
  1770.  
  1771. //setting line color
  1772. gfx_color(255,255,255);
  1773.  
  1774. //drawing vertical grid
  1775. gfx_line(600,0,600,800);
  1776. gfx_line(800,0,800,800);
  1777. gfx_line(1000,0,1000,800);
  1778. gfx_line(1200,0,1200,800);
  1779.  
  1780. //drawing horizontal grid
  1781. gfx_line(600,200,1200,200);
  1782. gfx_line(600,400,1200,400);
  1783. gfx_line(600,600,1200,600);
  1784. gfx_line(600,800,1200,800);
  1785.  
  1786.  
  1787. // triangle
  1788. gfx_color(0,255,0);//light green
  1789. gfx_line(650,75,750,75);
  1790. gfx_line(750,75,700,125);
  1791. gfx_line(700,125,650,75);
  1792.  
  1793. gfx_color(138,43,226);//purple
  1794. gfx_line(850,75,950,75);
  1795. gfx_line(950,75,900,125);
  1796. gfx_line(900,125,850,75);
  1797.  
  1798. gfx_color(220,20,60);//red
  1799. gfx_line(1050,75,1150,75);
  1800. gfx_line(1150,75,1100,125);
  1801. gfx_line(1100,125,1050,75);
  1802.  
  1803. //parallelogram
  1804. gfx_color(255,255,255);//white
  1805. gfx_line(635,275,660,325);
  1806. gfx_line(735,275,760,325);
  1807. gfx_line(635,275,735,275);
  1808. gfx_line(660,325,760,325);
  1809.  
  1810. gfx_color(72,209,204);//light blue
  1811. gfx_line(835,275,860,325);
  1812. gfx_line(935,275,960,325);
  1813. gfx_line(835,275,935,275);
  1814. gfx_line(860,325,960,325);
  1815.  
  1816. gfx_color(0,0,255);//dark blue
  1817. gfx_line(1035,275,1060,325);
  1818. gfx_line(1135,275,1160,325);
  1819. gfx_line(1035,275,1135,275);
  1820. gfx_line(1060,325,1160,325);
  1821.  
  1822. //diamond
  1823. gfx_color(0,0,255); //blue
  1824. gfx_line(650,700,700,750);
  1825. gfx_line(700,750,750,700);
  1826. gfx_line(750,700,700,650);
  1827. gfx_line(700,650,650,700);
  1828.  
  1829. gfx_color(0,128,0); //dark green
  1830. gfx_line(850,700,900,750);
  1831. gfx_line(900,750,950,700);
  1832. gfx_line(950,700,900,650);
  1833. gfx_line(900,650,850,700);
  1834.  
  1835. gfx_color(0,255,0);//light green
  1836. gfx_line(1050,700,1100,750);
  1837. gfx_line(1100,750,1150,700);
  1838. gfx_line(1150,700,1100,650);
  1839. gfx_line(1100,650,1050,700);
  1840.  
  1841. //circle
  1842. gfx_color(255,0,255); //pink
  1843. gfx_circle(700,500,100);
  1844.  
  1845. gfx_color(255,105,180); //light pink
  1846. gfx_circle(900,500,100);
  1847.  
  1848. gfx_color(255,255,0); //yellow
  1849. gfx_circle(1100,500,100);
  1850.  
  1851. //Letter in circle
  1852. gfx_color(255,255,255);
  1853.  
  1854. gfx_text(a,610,102);
  1855.  
  1856. gfx_text(b,810,102);
  1857.  
  1858. gfx_text(cc,1010,102);
  1859.  
  1860. gfx_text(d,610,302);
  1861.  
  1862. gfx_text(e,810,302);
  1863.  
  1864. gfx_text(f,1010,302);
  1865.  
  1866. gfx_text(g,610,502);
  1867.  
  1868. gfx_text(h,810,502);
  1869.  
  1870. gfx_text(i,1010,502);
  1871.  
  1872. gfx_text(j,610,702);
  1873.  
  1874. gfx_text(k,810,702);
  1875.  
  1876. gfx_text(l,1010,702);
  1877.  
  1878. c = gfx_wait();
  1879.  
  1880. if(c == 'd' || (gfx_xpos() >= 600 && gfx_xpos() <= 800) && (gfx_ypos() >= 200 && gfx_ypos() <= 400))
  1881. {
  1882. gfx_clear();
  1883. gfx_text(correct,800,300);
  1884. gfx_text(scoreone,800,400);
  1885. gfx_text(guessone,800,450);
  1886. gfx_text(between,800,500);
  1887. //printf("%d\n",score);
  1888. c = gfx_wait();
  1889. gfx_clear();
  1890. gfx_text(finalfinal,800,500);
  1891. gfx_wait();
  1892. break;
  1893. }
  1894.  
  1895.  
  1896. else // wrong decision
  1897. {//163
  1898. gfx_clear();
  1899. gfx_color(255,255,255);
  1900. gfx_text(wrong,800,300);
  1901. gfx_text(gg,800,350);
  1902. gfx_text(gameover,800,400);
  1903. gfx_text(finish,800,450);
  1904. c = gfx_wait();
  1905. break;
  1906. }//155
  1907. c = gfx_wait();
  1908.  
  1909. }//if
  1910.  
  1911. }//while
  1912.  
  1913.  
  1914. }// program end
  1915.  
  1916. int score_add(int score1)
  1917. {
  1918. score1 = ++score1;
  1919. return(score1);
  1920. }
  1921.  
  1922. int guess_minus(int guess1)
  1923. {
  1924. guess1 = --guess1;
  1925. return(guess1);
  1926. }
Add Comment
Please, Sign In to add comment