Advertisement
Guest User

Untitled

a guest
Nov 20th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 62.40 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 Y 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("Score = redacted", 800,450);
  548. gfx_text(finish,800,500);
  549. c = gfx_wait();
  550. break;
  551. }//536
  552. }//509
  553.  
  554. if (score == 3)
  555. {
  556. gfx_text(guessthree,100,250);
  557. gfx_text(scorethree,100,200);
  558. }
  559. if (score == 2)
  560. {
  561. gfx_text(guesstwo,100,250);
  562. gfx_text(scoretwo,100,200);
  563. }
  564. if (score == 1)
  565. {
  566. gfx_text(guessone,100,250);
  567. gfx_text(scoreone,100,200);
  568. }//level three end(392 - 561)
  569.  
  570. gfx_text(levelfour,1100,100);//level four start (563 -731)
  571. gfx_text(lgreen,100,100);
  572.  
  573. // setting line color
  574. gfx_color(0,0,0);
  575.  
  576. //drawing vertical grid
  577. gfx_line(600,0,600,1000);
  578. gfx_line(800,0,800,1000);
  579. gfx_line(1000,0,1000,1000);
  580.  
  581. //drawing horizontal grid
  582. gfx_line(600,200,1000,200);
  583. gfx_line(600,400,1000,400);
  584. gfx_line(600,600,1000,600);
  585. gfx_line(600,800,1000,800);
  586. gfx_line(600,1000,1000,1000);
  587.  
  588. // drawing in circles with different colors
  589.  
  590. gfx_color(255,255,0); //yellow
  591. gfx_fillcircle(700,100,150);
  592.  
  593. gfx_color(0,0,0); //black
  594. gfx_fillcircle(900,100,150);
  595.  
  596. gfx_color(0,0,100); //dark blue
  597. gfx_fillcircle(700,300,150);
  598.  
  599. gfx_color(128,0,128); //purple
  600. gfx_fillcircle(900,300,150);
  601.  
  602. gfx_color(204,102,0); //brown
  603. gfx_fillcircle(700,500,150);
  604.  
  605. gfx_color(255,0,255); //pink
  606. gfx_fillcircle(900,500,150);
  607.  
  608. gfx_color(0,128,0); //dark green
  609. gfx_fillcircle(700,700,150);
  610.  
  611. gfx_color(0,255,0); //light green
  612. gfx_fillcircle(900,700,150);
  613.  
  614. gfx_color(0,0,255); //light blue
  615. gfx_fillcircle(700,900,150);
  616.  
  617. gfx_color(255,0,0); //red
  618. gfx_fillcircle(900,900,150);
  619.  
  620. //Letter in circle
  621. gfx_color(0,0,0);
  622.  
  623. gfx_text(a,610,102);
  624.  
  625. gfx_text(b,810,102);
  626.  
  627. gfx_text(cc,610,302);
  628.  
  629. gfx_text(d,810,302);
  630.  
  631. gfx_text(e,610,502);
  632.  
  633. gfx_text(f,810,502);
  634.  
  635. gfx_text(g,610,702);
  636.  
  637. gfx_text(h,810,702);
  638.  
  639. gfx_text(i,610,902);
  640.  
  641. gfx_text(j,810,902);
  642.  
  643. c = gfx_wait();
  644. gfx_color(0,0,0);
  645.  
  646. if (c == 'h' || (gfx_xpos() >= 800 && gfx_xpos() <= 1000) && (gfx_ypos() >= 600 && gfx_ypos() <= 800)) // correct condition
  647. {//677
  648. score = score_add(score);
  649. if (score == 4)
  650. {//653
  651. gfx_clear();
  652. gfx_text(correct,800,300);
  653. gfx_text(scorefour,800,400);
  654. gfx_text(guessthree,800,450);
  655. gfx_text(between,800,500);
  656. //printf("%d\n",score);
  657. c = gfx_wait();
  658. gfx_clear();
  659. }//643
  660.  
  661. else if (score == 3)
  662. {//655
  663. gfx_clear();
  664. gfx_text(correct,800,300);
  665. gfx_text(scorethree,800,400);
  666. gfx_text(guesstwo,800,450);
  667. gfx_text(between,800,500);
  668. //printf("%d\n",score);
  669. c = gfx_wait();
  670. gfx_clear();
  671. }//664
  672.  
  673. else if (score == 2)
  674. {//676
  675. gfx_clear();
  676. gfx_text(correct,800,300);
  677. gfx_text(scoretwo,800,400);
  678. gfx_text(guessone,800,450);
  679. gfx_text(between,800,500);
  680. //printf("%d\n",score);
  681. c = gfx_wait();
  682. gfx_clear();
  683. }//667
  684. }//640
  685.  
  686. else
  687. {//716
  688. guess = guess_minus(guess);
  689. if (guess == 2)
  690. {//692
  691. gfx_clear();
  692. gfx_text(wrong,800,300);
  693. gfx_text(scorethree,800,400);
  694. gfx_text(guesstwo,800,450);
  695. gfx_text(between,800,500);
  696. //printf("%d\n",guess);
  697. c = gfx_wait();
  698. gfx_clear();
  699. }//683
  700.  
  701. if (guess == 1)
  702. {//704
  703. gfx_clear();
  704. gfx_text(wrong,800,300);
  705. gfx_text(scoretwo,800,400);
  706. gfx_text(guessone,800,450);
  707. gfx_text(between,800,500);
  708. //printf("%d\n",guess);
  709. c = gfx_wait();
  710. gfx_clear();
  711. }//695
  712.  
  713. if (guess == 0)
  714. {//715
  715. gfx_clear();
  716. gfx_text(wrong,800,300);
  717. gfx_text(gg,800,350);
  718. gfx_text(gameover,800,400);
  719. gfx_text("Score = redacted", 800,450);
  720. gfx_text(finish,800,500);
  721. c = gfx_wait();
  722. break;
  723. }//707
  724. }//680
  725. if (score == 4)
  726. {
  727. gfx_text(guessthree,100,250);
  728. gfx_text(scorefour,100,200);
  729. }
  730. if (score == 3)
  731. {
  732. gfx_text(guesstwo,100,250);
  733. gfx_text(scorethree,100,200);
  734. }
  735. if (score == 2)
  736. {
  737. gfx_text(guessone,100,250);
  738. gfx_text(scoretwo,100,200);
  739. }// level four end (563 - 731)
  740.  
  741. gfx_text(levelfive,1100,100);//level five start (733 -
  742. gfx_text(yellow,100,100);
  743.  
  744. // setting line color
  745. gfx_color(0,0,0);
  746.  
  747. //drawing vertical grid
  748. gfx_line(600,0,600,1000);
  749. gfx_line(800,0,800,1000);
  750. gfx_line(1000,0,1000,1000);
  751.  
  752. //drawing horizontal grid
  753. gfx_line(600,200,1000,200);
  754. gfx_line(600,400,1000,400);
  755. gfx_line(600,600,1000,600);
  756. gfx_line(600,800,1000,800);
  757. gfx_line(600,1000,1000,1000);
  758.  
  759. // drawing in circles with different colors
  760.  
  761. gfx_color(128,0,128); //purple
  762. gfx_fillcircle(700,100,150);
  763.  
  764. gfx_color(0,0,255); //light blue
  765. gfx_fillcircle(900,100,150);
  766.  
  767. gfx_color(255,255,0); //yellow
  768. gfx_fillcircle(700,300,150);
  769.  
  770. gfx_color(0,0,100); //dark blue
  771. gfx_fillcircle(900,300,150);
  772.  
  773. gfx_color(204,102,0); //brown
  774. gfx_fillcircle(700,500,150);
  775.  
  776. gfx_color(255,0,255); //pink
  777. gfx_fillcircle(900,500,150);
  778.  
  779. gfx_color(0,128,0); //dark green
  780. gfx_fillcircle(700,700,150);
  781.  
  782. gfx_color(255,0,0); //red
  783. gfx_fillcircle(900,700,150);
  784.  
  785. gfx_color(0,255,0); //light green
  786. gfx_fillcircle(700,900,150);
  787.  
  788. gfx_color(0,0,0); //black
  789. gfx_fillcircle(900,900,150);
  790.  
  791. //Letter in circle
  792. gfx_color(0,0,0);
  793.  
  794. gfx_text(a,610,102);
  795.  
  796. gfx_text(b,810,102);
  797.  
  798. gfx_text(cc,610,302);
  799.  
  800. gfx_text(d,810,302);
  801.  
  802. gfx_text(e,610,502);
  803.  
  804. gfx_text(f,810,502);
  805.  
  806. gfx_text(g,610,702);
  807.  
  808. gfx_text(h,810,702);
  809.  
  810. gfx_text(i,610,902);
  811.  
  812. gfx_text(j,810,902);
  813.  
  814. c = gfx_wait();
  815. gfx_color(0,0,0);
  816.  
  817. if (c == 'c' || (gfx_xpos() >= 600 && gfx_xpos() <= 800) && (gfx_ypos() >= 200 && gfx_ypos() <= 400)) // correct condition
  818. {
  819. score = score_add(score);
  820. if (score == 5)
  821. {//140
  822. gfx_clear();
  823. gfx_text(correct,800,300);
  824. gfx_text(scorefive,800,400);
  825. gfx_text(guessthree,800,450);
  826. //printf("%d\n",score);
  827. c = gfx_wait();
  828. gfx_clear();
  829. }//136
  830.  
  831. if (score == 4)
  832. {//140
  833. gfx_clear();
  834. gfx_text(correct,800,300);
  835. gfx_text(scorefour,800,400);
  836. gfx_text(guesstwo,800,450);
  837. //printf("%d\n",score);
  838. c = gfx_wait();
  839. gfx_clear();
  840. }//136
  841.  
  842. if (score == 3)
  843. {//140
  844. gfx_clear();
  845. gfx_text(correct,800,300);
  846. gfx_text(scorethree,800,400);
  847. gfx_text(guessone,800,450);
  848. //printf("%d\n",score);
  849. c = gfx_wait();
  850. gfx_clear();
  851. }//136
  852.  
  853. }
  854. else
  855. {
  856. guess = guess_minus(guess);
  857.  
  858. if (guess == 2)
  859. {
  860. gfx_clear();
  861. gfx_text(wrong,800,300);
  862. gfx_text(scorefour,800,400);
  863. gfx_text(guesstwo,800,450);
  864. gfx_text(between,800,500);
  865. //printf("%d\n",guess);
  866. c = gfx_wait();
  867. gfx_clear();
  868. }
  869.  
  870. if (guess == 1)
  871. {
  872. gfx_clear();
  873. gfx_text(wrong,800,300);
  874. gfx_text(scorethree,800,400);
  875. gfx_text(guessone,800,450);
  876. gfx_text(between,800,500);
  877. //printf("%d\n",guess);
  878. c = gfx_wait();
  879. gfx_clear();
  880. }
  881.  
  882. if (guess == 0)
  883. {
  884. gfx_clear();
  885. gfx_text(wrong,800,300);
  886. gfx_text(gg,800,350);
  887. gfx_text(gameover,800,400);
  888. gfx_text("Score = redacted", 800,450);
  889. gfx_text(finish,800,500);
  890. c = gfx_wait();
  891. break;
  892. }
  893. }
  894. if (score == 5)
  895. {
  896. gfx_text(scorefive,100,200);
  897. gfx_text(nexttwo,100,100);
  898. }
  899.  
  900. if (score == 4)
  901. {
  902. gfx_text(scorefour,100,200);
  903. gfx_text(nexttwo,100,100);
  904. }
  905. if (score == 3)
  906. {
  907. gfx_text(scorethree,100,200);
  908. gfx_text(nexttwo,100,100);
  909. }
  910.  
  911. c = gfx_wait();
  912.  
  913. score = 0;
  914. guess = 3;
  915.  
  916. //level one(91 - 183)
  917. gfx_clear();
  918. gfx_text(starttwo,800,500);
  919. c = gfx_wait();
  920. gfx_clear();
  921. gfx_color(0,0,0);
  922. gfx_text(leveltwoone,1100,100);
  923. gfx_text(grey,100,100);
  924. gfx_text(scorezero,100,200);
  925. gfx_text(guessthree,100,300);
  926.  
  927. // setting line color
  928. gfx_color(0,0,0);
  929.  
  930. //drawing vertical grid
  931. gfx_line(600,0,600,800);
  932. gfx_line(800,0,800,800);
  933. gfx_line(1000,0,1000,800);
  934. gfx_line(1200,0,1200,800);
  935.  
  936. //drawing horizontal grid
  937. gfx_line(600,200,1200,200);
  938. gfx_line(600,400,1200,400);
  939. gfx_line(600,600,1200,600);
  940. gfx_line(600,800,1200,800);
  941.  
  942. // drawing in circles with different colors
  943.  
  944. gfx_color(0,0,0); //black
  945. gfx_fillcircle(700,100,150);
  946.  
  947. gfx_color(255,0,0); //red
  948. gfx_fillcircle(900,100,150);
  949.  
  950. gfx_color(0,255,0); //light green
  951. gfx_fillcircle(700,300,150);
  952.  
  953. gfx_color(0,0,255); //light blue
  954. gfx_fillcircle(900,300,150);
  955.  
  956. gfx_color(255,255,0); //yellow
  957. gfx_fillcircle(700,500,150);
  958.  
  959. gfx_color(0,128,0); //dark green
  960. gfx_fillcircle(900,500,150);
  961.  
  962. gfx_color(255,0,255); //pink
  963. gfx_fillcircle(700,700,150);
  964.  
  965. gfx_color(128,0,128); //purple
  966. gfx_fillcircle(900,700,150);
  967.  
  968. gfx_color(0,0,100); //dark blue
  969. gfx_fillcircle(1100,100,150);
  970.  
  971. gfx_color(0,255,255); //cyan
  972. gfx_fillcircle(1100,300,150);
  973.  
  974. gfx_color(204,102,0); //brown
  975. gfx_fillcircle(1100,500,150);
  976.  
  977. gfx_color(112,128,144); //grey
  978. gfx_fillcircle(1100,700,150);
  979.  
  980. //Letter in circle
  981. gfx_color(0,0,0);
  982.  
  983. gfx_text(a,610,102);
  984.  
  985. gfx_text(b,810,102);
  986.  
  987. gfx_text(cc,1010,102);
  988.  
  989. gfx_text(d,610,302);
  990.  
  991. gfx_text(e,810,302);
  992.  
  993. gfx_text(f,1010,302);
  994.  
  995. gfx_text(g,610,502);
  996.  
  997. gfx_text(h,810,502);
  998.  
  999. gfx_text(i,1010,502);
  1000.  
  1001. gfx_text(j,610,702);
  1002.  
  1003. gfx_text(k,810,702);
  1004.  
  1005. gfx_text(l,1010,702);
  1006.  
  1007. c = gfx_wait();
  1008.  
  1009.  
  1010.  
  1011. if (c == 'l' || (x >= 1000 && x <= 1200) && (y >= 600 && y <= 800)) // correct decision
  1012. {//140
  1013. score = score_add(score);
  1014. gfx_clear();
  1015. gfx_text(correct,800,300);
  1016. gfx_text(scoreone,800,400);
  1017. gfx_text(guessthree,800,450);
  1018. gfx_text(between,800,500);
  1019. //printf("%d\n",score);
  1020. c = gfx_wait();
  1021. gfx_clear();
  1022. }//136
  1023.  
  1024. else // wrong decision
  1025. {//163
  1026. guess = guess_minus(guess);
  1027. gfx_clear();
  1028. gfx_text(wrong,800,300);
  1029. gfx_text(scorezero,800,400);
  1030. gfx_text(guesstwo,800,450);
  1031. gfx_text(between,800,500);
  1032. //printf("%d\n",guess);
  1033. c = gfx_wait();
  1034. gfx_clear();
  1035. }//155
  1036.  
  1037. if (score == 1)
  1038. {
  1039. gfx_text(guessthree,100,250);
  1040. gfx_text(scoreone,100,200);
  1041. }
  1042. if (guess == 2)
  1043. {
  1044. gfx_text(guesstwo,100,250);
  1045. gfx_text(scorezero,100,200);
  1046. }
  1047.  
  1048. //level two(186 - 295)
  1049. gfx_text(leveltwotwo,1100,100);
  1050. gfx_text(purple,100,100);
  1051.  
  1052. // setting line color
  1053. gfx_color(0,0,0);
  1054.  
  1055. //drawing vertical grid
  1056. gfx_line(600,0,600,800);
  1057. gfx_line(800,0,800,800);
  1058. gfx_line(1000,0,1000,800);
  1059. gfx_line(1200,0,1200,800);
  1060.  
  1061. //drawing horizontal grid
  1062. gfx_line(600,200,1200,200);
  1063. gfx_line(600,400,1200,400);
  1064. gfx_line(600,600,1200,600);
  1065. gfx_line(600,800,1200,800);
  1066.  
  1067. // drawing in circles with different colors
  1068.  
  1069. gfx_color(255,0,0); //red
  1070. gfx_fillcircle(700,100,150);
  1071.  
  1072. gfx_color(255,255,0); //yellow
  1073. gfx_fillcircle(900,100,150);
  1074.  
  1075. gfx_color(0,0,255); //light blue
  1076. gfx_fillcircle(700,300,150);
  1077.  
  1078. gfx_color(0,255,0); //light green
  1079. gfx_fillcircle(900,300,150);
  1080.  
  1081. gfx_color(0,0,0); //black
  1082. gfx_fillcircle(700,500,150);
  1083.  
  1084. gfx_color(0,0,100); //dark green
  1085. gfx_fillcircle(900,500,150);
  1086.  
  1087. gfx_color(255,0,255); //pink
  1088. gfx_fillcircle(700,700,150);
  1089.  
  1090. gfx_color(128,0,128); //purple
  1091. gfx_fillcircle(900,700,150);
  1092.  
  1093. gfx_color(0,128,0); //dark blue
  1094. gfx_fillcircle(1100,100,150);
  1095.  
  1096. gfx_color(112,128,144); //grey
  1097. gfx_fillcircle(1100,300,150);
  1098.  
  1099. gfx_color(204,102,0); //brown
  1100. gfx_fillcircle(1100,500,150);
  1101.  
  1102. gfx_color(0,255,255); //cyan
  1103. gfx_fillcircle(1100,700,150);
  1104.  
  1105. //Letter in circle
  1106. gfx_color(0,0,0);
  1107.  
  1108. gfx_text(a,610,102);
  1109.  
  1110. gfx_text(b,810,102);
  1111.  
  1112. gfx_text(cc,1010,102);
  1113.  
  1114. gfx_text(d,610,302);
  1115.  
  1116. gfx_text(e,810,302);
  1117.  
  1118. gfx_text(f,1010,302);
  1119.  
  1120. gfx_text(g,610,502);
  1121.  
  1122. gfx_text(h,810,502);
  1123.  
  1124. gfx_text(i,1010,502);
  1125.  
  1126. gfx_text(j,610,702);
  1127.  
  1128. gfx_text(k,810,702);
  1129.  
  1130. gfx_text(l,1010,702);
  1131.  
  1132. c = gfx_wait();
  1133. gfx_color(0,0,0);
  1134.  
  1135. if (c == 'k' || (gfx_xpos() >= 800 && gfx_xpos() <= 1000) && (gfx_ypos() >= 600 && gfx_ypos() <= 900)) // correct condition
  1136. {
  1137. score = score_add(score);
  1138. if (score == 2)
  1139. {//140
  1140. gfx_clear();
  1141. gfx_text(correct,800,300);
  1142. gfx_text(scoretwo,800,400);
  1143. gfx_text(guessthree,800,450);
  1144. gfx_text(between,800,500);
  1145. //printf("%d\n",score);
  1146. x = gfx_wait();
  1147. gfx_clear();
  1148. }//136
  1149.  
  1150. else if (score == 1)
  1151. {//140
  1152. gfx_clear();
  1153. gfx_text(correct,800,300);
  1154. gfx_text(scoreone,800,400);
  1155. gfx_text(guesstwo,800,450);
  1156. gfx_text(between,800,500);
  1157. //printf("%d\n",score);
  1158. c = gfx_wait();
  1159. gfx_clear();
  1160. }//136
  1161. }
  1162.  
  1163. else//wrong condition
  1164. {//163
  1165. guess = guess_minus(guess);
  1166. if (guess == 2)
  1167. {
  1168. gfx_clear();
  1169. gfx_text(wrong,800,300);
  1170. gfx_text(scoreone,800,400);
  1171. gfx_text(guesstwo,800,450);
  1172. gfx_text(between,800,500);
  1173. //printf("%d\n",guess);
  1174. c = gfx_wait();
  1175. gfx_clear();
  1176. }//155
  1177.  
  1178. else if(guess == 1)
  1179. {
  1180. gfx_clear();
  1181. gfx_text(wrong,800,300);
  1182. gfx_text(scorezero,800,400);
  1183. gfx_text(guessone,800,450);
  1184. gfx_text(between,800,500);
  1185. //printf("%d\n",guess);
  1186. c = gfx_wait();
  1187. gfx_clear();
  1188. }//155
  1189. }
  1190.  
  1191. if (score == 2)
  1192. {
  1193. gfx_text(guessthree,100,250);
  1194. gfx_text(scoretwo,100,200);
  1195. }
  1196. if (score == 1)
  1197. {
  1198. gfx_text(guesstwo,100,250);
  1199. gfx_text(scoreone,100,200);
  1200. }
  1201. if (score == 0)
  1202. {
  1203. gfx_text(guessone,100,250);
  1204. gfx_text(scorezero,100,200);
  1205. }
  1206.  
  1207. gfx_text(leveltwothree,1100,100);//level three (313 -
  1208. gfx_text(lgreen,100,100);
  1209.  
  1210. // setting line color
  1211. gfx_color(0,0,0);
  1212.  
  1213. //drawing vertical grid
  1214. gfx_line(600,0,600,800);
  1215. gfx_line(800,0,800,800);
  1216. gfx_line(1000,0,1000,800);
  1217. gfx_line(1200,0,1200,800);
  1218.  
  1219. //drawing horizontal grid
  1220. gfx_line(600,200,1200,200);
  1221. gfx_line(600,400,1200,400);
  1222. gfx_line(600,600,1200,600);
  1223. gfx_line(600,800,1200,800);
  1224.  
  1225. // drawing in circles with different colors
  1226.  
  1227. gfx_color(0,0,255); //light blue
  1228. gfx_fillcircle(700,100,150);
  1229.  
  1230. gfx_color(255,0,0); //red
  1231. gfx_fillcircle(900,100,150);
  1232.  
  1233. gfx_color(0,128,0); //dark green
  1234. gfx_fillcircle(700,300,150);
  1235.  
  1236. gfx_color(0,0,0); //black
  1237. gfx_fillcircle(900,300,150);
  1238.  
  1239. gfx_color(255,255,0); //yellow
  1240. gfx_fillcircle(700,500,150);
  1241.  
  1242. gfx_color(0,255,255); //cyan
  1243. gfx_fillcircle(900,500,150);
  1244.  
  1245. gfx_color(112,128,144); //grey
  1246. gfx_fillcircle(700,700,150);
  1247.  
  1248. gfx_color(128,0,128); //purple
  1249. gfx_fillcircle(900,700,150);
  1250.  
  1251. gfx_color(204,102,0); //brown
  1252. gfx_fillcircle(1100,100,150);
  1253.  
  1254. gfx_color(0,0,100); //dark blue
  1255. gfx_fillcircle(1100,300,150);
  1256.  
  1257. gfx_color(0,255,0); //light green
  1258. gfx_fillcircle(1100,500,150);
  1259.  
  1260. gfx_color(255,0,255); //pink
  1261. gfx_fillcircle(1100,700,150);
  1262.  
  1263. //Letter in circle
  1264. gfx_color(0,0,0);
  1265.  
  1266. gfx_text(a,610,102);
  1267.  
  1268. gfx_text(b,810,102);
  1269.  
  1270. gfx_text(cc,1010,102);
  1271.  
  1272. gfx_text(d,610,302);
  1273.  
  1274. gfx_text(e,810,302);
  1275.  
  1276. gfx_text(f,1010,302);
  1277.  
  1278. gfx_text(g,610,502);
  1279.  
  1280. gfx_text(h,810,502);
  1281.  
  1282. gfx_text(i,1010,502);
  1283.  
  1284. gfx_text(j,610,702);
  1285.  
  1286. gfx_text(k,810,702);
  1287.  
  1288. gfx_text(l,1010,702);
  1289.  
  1290. c = gfx_wait();
  1291. gfx_color(0,0,0);
  1292.  
  1293. if (c == 'i' || (gfx_xpos() >= 1000 && gfx_xpos() <= 1200) && (gfx_ypos() >= 400 && gfx_ypos() <= 600)) // correct condition
  1294. {
  1295. score = score_add(score);
  1296. if (score == 3)
  1297. {//140
  1298. gfx_clear();
  1299. gfx_text(correct,800,300);
  1300. gfx_text(scorethree,800,400);
  1301. gfx_text(guessthree,800,450);
  1302. gfx_text(between,800,500);
  1303. //printf("%d\n",score);
  1304. c = gfx_wait();
  1305. gfx_clear();
  1306. }//136
  1307.  
  1308. else if (score == 2)
  1309. {//140
  1310. gfx_clear();
  1311. gfx_text(correct,800,300);
  1312. gfx_text(scoretwo,800,400);
  1313. gfx_text(guesstwo,800,450);
  1314. gfx_text(between,800,500);
  1315. //printf("%d\n",score);
  1316. c = gfx_wait();
  1317. gfx_clear();
  1318. }//136
  1319.  
  1320. else if (score == 1)
  1321. {//140
  1322. gfx_clear();
  1323. gfx_text(correct,800,300);
  1324. gfx_text(scoreone,800,400);
  1325. gfx_text(guessone,800,450);
  1326. gfx_text(between,800,500);
  1327. //printf("%d\n",score);
  1328. c = gfx_wait();
  1329. gfx_clear();
  1330. }//136
  1331. }
  1332.  
  1333. else//wrong condition
  1334. {//163
  1335. guess = guess_minus(guess);
  1336. if (guess == 2)
  1337. {
  1338. gfx_clear();
  1339. gfx_text(wrong,800,300);
  1340. gfx_text(scoretwo,800,400);
  1341. gfx_text(guesstwo,800,450);
  1342. gfx_text(between,800,500);
  1343. //printf("%d\n",guess);
  1344. c = gfx_wait();
  1345. gfx_clear();
  1346. }//155
  1347.  
  1348. else if(guess == 1)
  1349. {
  1350. gfx_clear();
  1351. gfx_text(wrong,800,300);
  1352. gfx_text(scoreone,800,400);
  1353. gfx_text(guessone,800,450);
  1354. gfx_text(between,800,500);
  1355. //printf("%d\n",guess);
  1356. c = gfx_wait();
  1357. gfx_clear();
  1358. }//155
  1359.  
  1360. else if (guess == 0)
  1361. {
  1362. gfx_clear();
  1363. gfx_text(wrong,800,300);
  1364. gfx_text(gg,800,350);
  1365. gfx_text(gameover,800,400);
  1366. gfx_text("Score = redacted", 800,450);
  1367. gfx_text(finish,800,500);
  1368. c = gfx_wait();
  1369. break;
  1370. }
  1371. }//66
  1372.  
  1373. if (score == 3)
  1374. {
  1375. gfx_text(guessthree,100,250);
  1376. gfx_text(scorethree,100,200);
  1377. }
  1378. if (score == 2)
  1379. {
  1380. gfx_text(guesstwo,100,250);
  1381. gfx_text(scoretwo,100,200);
  1382. }
  1383. if (score == 1)
  1384. {
  1385. gfx_text(guessone,100,250);
  1386. gfx_text(scoreone,100,200);
  1387. }
  1388.  
  1389. gfx_text(leveltwofour,1100,100);//level four
  1390. gfx_text(dblue,100,100);
  1391.  
  1392. // setting line color
  1393. gfx_color(0,0,0);
  1394.  
  1395. //drawing vertical grid
  1396. gfx_line(600,0,600,800);
  1397. gfx_line(800,0,800,800);
  1398. gfx_line(1000,0,1000,800);
  1399. gfx_line(1200,0,1200,800);
  1400.  
  1401. //drawing horizontal grid
  1402. gfx_line(600,200,1200,200);
  1403. gfx_line(600,400,1200,400);
  1404. gfx_line(600,600,1200,600);
  1405. gfx_line(600,800,1200,800);
  1406.  
  1407. // drawing in circles with different colors
  1408.  
  1409. gfx_color(112,128,144); //grey
  1410. gfx_fillcircle(700,100,150);
  1411.  
  1412. gfx_color(255,0,0); //red
  1413. gfx_fillcircle(900,100,150);
  1414.  
  1415. gfx_color(0,0,0); //black
  1416. gfx_fillcircle(700,300,150);
  1417.  
  1418. gfx_color(0,0,255); //light blue
  1419. gfx_fillcircle(900,300,150);
  1420.  
  1421. gfx_color(0,255,255); //cyan
  1422. gfx_fillcircle(700,500,150);
  1423.  
  1424. gfx_color(0,128,0); //dark green
  1425. gfx_fillcircle(900,500,150);
  1426.  
  1427. gfx_color(255,0,255); //pink
  1428. gfx_fillcircle(700,700,150);
  1429.  
  1430. gfx_color(128,0,128); //purple
  1431. gfx_fillcircle(900,700,150);
  1432.  
  1433. gfx_color(0,255,0); //light green
  1434. gfx_fillcircle(1100,100,150);
  1435.  
  1436. gfx_color(255,255,0); //yellow
  1437. gfx_fillcircle(1100,300,150);
  1438.  
  1439. gfx_color(0,0,100); //dark blue
  1440. gfx_fillcircle(1100,500,150);
  1441.  
  1442. gfx_color(204,102,0); //brown
  1443. gfx_fillcircle(1100,700,150);
  1444.  
  1445. //Letter in circle
  1446. gfx_color(0,0,0);
  1447.  
  1448. gfx_text(a,610,102);
  1449.  
  1450. gfx_text(b,810,102);
  1451.  
  1452. gfx_text(cc,1010,102);
  1453.  
  1454. gfx_text(d,610,302);
  1455.  
  1456. gfx_text(e,810,302);
  1457.  
  1458. gfx_text(f,1010,302);
  1459.  
  1460. gfx_text(g,610,502);
  1461.  
  1462. gfx_text(h,810,502);
  1463.  
  1464. gfx_text(i,1010,502);
  1465.  
  1466. gfx_text(j,610,702);
  1467.  
  1468. gfx_text(k,810,702);
  1469.  
  1470. gfx_text(l,1010,702);
  1471.  
  1472. c = gfx_wait();
  1473. gfx_color(0,0,0);
  1474.  
  1475. if (c == 'i' || (gfx_xpos() >= 1000 && gfx_xpos() <= 1200) && (gfx_ypos() >= 400 && gfx_ypos() <= 600)) // correct condition
  1476. {
  1477. score = score_add(score);
  1478. if (score == 4)
  1479. {//140
  1480. gfx_clear();
  1481. gfx_text(correct,800,300);
  1482. gfx_text(scorefour,800,400);
  1483. gfx_text(guessthree,800,450);
  1484. gfx_text(between,800,500);
  1485. //printf("%d\n",score);
  1486. c = gfx_wait();
  1487. gfx_clear();
  1488. }//136
  1489.  
  1490. else if (score == 3)
  1491. {//140
  1492. gfx_clear();
  1493. gfx_text(correct,800,300);
  1494. gfx_text(scorethree,800,400);
  1495. gfx_text(guesstwo,800,450);
  1496. gfx_text(between,800,500);
  1497. //printf("%d\n",score);
  1498. c = gfx_wait();
  1499. gfx_clear();
  1500. }//136
  1501.  
  1502. else if (score == 2)
  1503. {//140
  1504. gfx_clear();
  1505. gfx_text(correct,800,300);
  1506. gfx_text(scoretwo,800,400);
  1507. gfx_text(guessone,800,450);
  1508. gfx_text(between,800,500);
  1509. //printf("%d\n",score);
  1510. c = gfx_wait();
  1511. gfx_clear();
  1512. }//136
  1513. }
  1514.  
  1515. else
  1516. {
  1517. guess = guess_minus(guess);
  1518. if (guess == 2)
  1519. {
  1520. gfx_clear();
  1521. gfx_text(wrong,800,300);
  1522. gfx_text(scorethree,800,400);
  1523. gfx_text(guesstwo,800,450);
  1524. gfx_text(between,800,500);
  1525. //printf("%d\n",guess);
  1526. c = gfx_wait();
  1527. gfx_clear();
  1528. }
  1529.  
  1530. if (guess == 1)
  1531. {
  1532. gfx_clear();
  1533. gfx_text(wrong,800,300);
  1534. gfx_text(scoretwo,800,400);
  1535. gfx_text(guessone,800,450);
  1536. gfx_text(between,800,500);
  1537. //printf("%d\n",guess);
  1538. c = gfx_wait();
  1539. gfx_clear();
  1540. }
  1541.  
  1542. if (guess == 0)
  1543. {
  1544. gfx_clear();
  1545. gfx_text(wrong,800,300);
  1546. gfx_text(gg,800,350);
  1547. gfx_text(gameover,800,400);
  1548. gfx_text("Score = redacted", 800,450);
  1549. gfx_text(finish,800,500);
  1550. c = gfx_wait();
  1551. break;
  1552. }
  1553. }
  1554. if (score == 4)
  1555. {
  1556. gfx_text(guessthree,100,250);
  1557. gfx_text(scorefour,100,200);
  1558. }
  1559. if (score == 3)
  1560. {
  1561. gfx_text(guesstwo,100,250);
  1562. gfx_text(scorethree,100,200);
  1563. }
  1564. if (score == 2)
  1565. {
  1566. gfx_text(guessone,100,250);
  1567. gfx_text(scoretwo,100,200);
  1568. }
  1569.  
  1570. gfx_text(leveltwofive,1100,100);//level five
  1571. gfx_text(pink,100,100);
  1572.  
  1573. // setting line color
  1574. gfx_color(0,0,0);
  1575.  
  1576. //drawing vertical grid
  1577. gfx_line(600,0,600,800);
  1578. gfx_line(800,0,800,800);
  1579. gfx_line(1000,0,1000,800);
  1580. gfx_line(1200,0,1200,800);
  1581.  
  1582. //drawing horizontal grid
  1583. gfx_line(600,200,1200,200);
  1584. gfx_line(600,400,1200,400);
  1585. gfx_line(600,600,1200,600);
  1586. gfx_line(600,800,1200,800);
  1587.  
  1588. // drawing in circles with different colors
  1589.  
  1590. gfx_color(255,0,255); //pink
  1591. gfx_fillcircle(700,100,150);
  1592.  
  1593. gfx_color(0,255,0); //light green
  1594. gfx_fillcircle(900,100,150);
  1595.  
  1596. gfx_color(0,0,255); //light blue
  1597. gfx_fillcircle(700,300,150);
  1598.  
  1599. gfx_color(255,0,0); //red
  1600. gfx_fillcircle(900,300,150);
  1601.  
  1602. gfx_color(255,255,0); //yellow
  1603. gfx_fillcircle(700,500,150);
  1604.  
  1605. gfx_color(0,128,0); //dark green
  1606. gfx_fillcircle(900,500,150);
  1607.  
  1608. gfx_color(0,0,0); //black
  1609. gfx_fillcircle(700,700,150);
  1610.  
  1611. gfx_color(0,255,255); //cyan
  1612. gfx_fillcircle(900,700,150);
  1613.  
  1614. gfx_color(0,0,100); //dark blue
  1615. gfx_fillcircle(1100,100,150);
  1616.  
  1617. gfx_color(128,0,128); //purple
  1618. gfx_fillcircle(1100,300,150);
  1619.  
  1620. gfx_color(112,128,144); //grey
  1621. gfx_fillcircle(1100,500,150);
  1622.  
  1623. gfx_color(204,102,0); //brown
  1624. gfx_fillcircle(1100,700,150);
  1625.  
  1626. //Letter in circle
  1627. gfx_color(0,0,0);
  1628.  
  1629. gfx_text(a,610,102);
  1630.  
  1631. gfx_text(b,810,102);
  1632.  
  1633. gfx_text(cc,1010,102);
  1634.  
  1635. gfx_text(d,610,302);
  1636.  
  1637. gfx_text(e,810,302);
  1638.  
  1639. gfx_text(f,1010,302);
  1640.  
  1641. gfx_text(g,610,502);
  1642.  
  1643. gfx_text(h,810,502);
  1644.  
  1645. gfx_text(i,1010,502);
  1646.  
  1647. gfx_text(j,610,702);
  1648.  
  1649. gfx_text(k,810,702);
  1650.  
  1651. gfx_text(l,1010,702);
  1652.  
  1653. c = gfx_wait();
  1654. gfx_color(0,0,0);
  1655.  
  1656. if (c == 'a' || (gfx_xpos() >= 600 && gfx_xpos() <= 800) && (gfx_ypos() >= 0 && gfx_ypos() <= 200)) // correct condition
  1657. {
  1658. score = score_add(score);
  1659. if (score == 5)
  1660. {//140
  1661. gfx_clear();
  1662. gfx_text(correct,800,300);
  1663. gfx_text(scorefive,800,400);
  1664. gfx_text(guessthree,800,450);
  1665. gfx_text(between,800,500);
  1666. //printf("%d\n",score);
  1667. c = gfx_wait();
  1668. gfx_clear();
  1669. }//136
  1670.  
  1671. if (score == 4)
  1672. {//140
  1673. gfx_clear();
  1674. gfx_text(correct,800,300);
  1675. gfx_text(scorefour,800,400);
  1676. gfx_text(guesstwo,800,450);
  1677. gfx_text(between,800,500);
  1678. //printf("%d\n",score);
  1679. c = gfx_wait();
  1680. gfx_clear();
  1681. }//136
  1682.  
  1683. if (score == 3)
  1684. {//140
  1685. gfx_clear();
  1686. gfx_text(correct,800,300);
  1687. gfx_text(scorethree,800,400);
  1688. gfx_text(guessone,800,450);
  1689. gfx_text(between,800,500);
  1690. //printf("%d\n",score);
  1691. c = gfx_wait();
  1692. gfx_clear();
  1693. }//136
  1694.  
  1695. }
  1696. else
  1697. {
  1698. guess = guess_minus(guess);
  1699.  
  1700. if (guess == 2)
  1701. {
  1702. gfx_clear();
  1703. gfx_text(wrong,800,300);
  1704. gfx_text(scorefour,800,400);
  1705. gfx_text(guesstwo,800,450);
  1706. gfx_text(between,800,500);
  1707. //printf("%d\n",guess);
  1708. c = gfx_wait();
  1709. gfx_clear();
  1710. }
  1711.  
  1712. if (guess == 1)
  1713. {
  1714. gfx_clear();
  1715. gfx_text(wrong,800,300);
  1716. gfx_text(scorethree,800,400);
  1717. gfx_text(guessone,800,450);
  1718. gfx_text(between,800,500);
  1719. //printf("%d\n",guess);
  1720. c = gfx_wait();
  1721. gfx_clear();
  1722. }
  1723.  
  1724. if (guess == 0)
  1725. {
  1726. gfx_clear();
  1727. gfx_text(wrong,800,300);
  1728. gfx_text(gg,800,350);
  1729. gfx_text(gameover,800,400);
  1730. gfx_text("Score = redacted", 800,450);
  1731. gfx_text(finish,800,500);
  1732. c = gfx_wait();
  1733. break;
  1734. }
  1735. }
  1736. gfx_text(congratstwo,100,100);
  1737. if (score == 5)
  1738. {
  1739. gfx_text(scorefive,100,200);
  1740. }
  1741.  
  1742. if (score == 4)
  1743. {
  1744. gfx_text(scorefour,100,200);
  1745. }
  1746. if (score == 3)
  1747. {
  1748. gfx_text(scorethree,100,200);
  1749. }
  1750. gfx_text(startthree,100,150);
  1751. c = gfx_wait();
  1752.  
  1753. guess = 1;
  1754. score = 0;
  1755.  
  1756. gfx_open(3000,1000,"bew");
  1757. gfx_clear_color(0,0,0);
  1758. gfx_clear();
  1759.  
  1760. gfx_color(255,255,255);
  1761. gfx_text(stagethree,800,500);
  1762. gfx_text(between,800,550);
  1763. c = gfx_wait();
  1764. gfx_clear();
  1765.  
  1766. gfx_text(finalone,800,500);
  1767. gfx_text(finaltwo,800,550);
  1768. c = gfx_wait();
  1769. gfx_clear();
  1770.  
  1771. gfx_color(255,255,255);
  1772. gfx_text(levelthreeone,1300,100);
  1773. gfx_text(whitetrapez,100,100);
  1774. gfx_text(scorezero,100,200);
  1775. gfx_text(guessone,100,300);
  1776.  
  1777. //setting line color
  1778. gfx_color(255,255,255);
  1779.  
  1780. //drawing vertical grid
  1781. gfx_line(600,0,600,800);
  1782. gfx_line(800,0,800,800);
  1783. gfx_line(1000,0,1000,800);
  1784. gfx_line(1200,0,1200,800);
  1785.  
  1786. //drawing horizontal grid
  1787. gfx_line(600,200,1200,200);
  1788. gfx_line(600,400,1200,400);
  1789. gfx_line(600,600,1200,600);
  1790. gfx_line(600,800,1200,800);
  1791.  
  1792.  
  1793. // triangle
  1794. gfx_color(0,255,0);//light green
  1795. gfx_line(650,75,750,75);
  1796. gfx_line(750,75,700,125);
  1797. gfx_line(700,125,650,75);
  1798.  
  1799. gfx_color(138,43,226);//purple
  1800. gfx_line(850,75,950,75);
  1801. gfx_line(950,75,900,125);
  1802. gfx_line(900,125,850,75);
  1803.  
  1804. gfx_color(220,20,60);//red
  1805. gfx_line(1050,75,1150,75);
  1806. gfx_line(1150,75,1100,125);
  1807. gfx_line(1100,125,1050,75);
  1808.  
  1809. //parallelogram
  1810. gfx_color(255,255,255);//white
  1811. gfx_line(635,275,660,325);
  1812. gfx_line(735,275,760,325);
  1813. gfx_line(635,275,735,275);
  1814. gfx_line(660,325,760,325);
  1815.  
  1816. gfx_color(72,209,204);//light blue
  1817. gfx_line(835,275,860,325);
  1818. gfx_line(935,275,960,325);
  1819. gfx_line(835,275,935,275);
  1820. gfx_line(860,325,960,325);
  1821.  
  1822. gfx_color(0,0,255);//dark blue
  1823. gfx_line(1035,275,1060,325);
  1824. gfx_line(1135,275,1160,325);
  1825. gfx_line(1035,275,1135,275);
  1826. gfx_line(1060,325,1160,325);
  1827.  
  1828. //diamond
  1829. gfx_color(0,0,255); //blue
  1830. gfx_line(650,700,700,750);
  1831. gfx_line(700,750,750,700);
  1832. gfx_line(750,700,700,650);
  1833. gfx_line(700,650,650,700);
  1834.  
  1835. gfx_color(0,128,0); //dark green
  1836. gfx_line(850,700,900,750);
  1837. gfx_line(900,750,950,700);
  1838. gfx_line(950,700,900,650);
  1839. gfx_line(900,650,850,700);
  1840.  
  1841. gfx_color(0,255,0);//light green
  1842. gfx_line(1050,700,1100,750);
  1843. gfx_line(1100,750,1150,700);
  1844. gfx_line(1150,700,1100,650);
  1845. gfx_line(1100,650,1050,700);
  1846.  
  1847. //circle
  1848. gfx_color(255,0,255); //pink
  1849. gfx_circle(700,500,100);
  1850.  
  1851. gfx_color(255,105,180); //light pink
  1852. gfx_circle(900,500,100);
  1853.  
  1854. gfx_color(255,255,0); //yellow
  1855. gfx_circle(1100,500,100);
  1856.  
  1857. //Letter in circle
  1858. gfx_color(255,255,255);
  1859.  
  1860. gfx_text(a,610,102);
  1861.  
  1862. gfx_text(b,810,102);
  1863.  
  1864. gfx_text(cc,1010,102);
  1865.  
  1866. gfx_text(d,610,302);
  1867.  
  1868. gfx_text(e,810,302);
  1869.  
  1870. gfx_text(f,1010,302);
  1871.  
  1872. gfx_text(g,610,502);
  1873.  
  1874. gfx_text(h,810,502);
  1875.  
  1876. gfx_text(i,1010,502);
  1877.  
  1878. gfx_text(j,610,702);
  1879.  
  1880. gfx_text(k,810,702);
  1881.  
  1882. gfx_text(l,1010,702);
  1883.  
  1884. c = gfx_wait();
  1885.  
  1886. if(c == 'd' || (gfx_xpos() >= 600 && gfx_xpos() <= 800) && (gfx_ypos() >= 200 && gfx_ypos() <= 400))
  1887. {
  1888. gfx_clear();
  1889. gfx_text(correct,800,300);
  1890. gfx_text(scoreone,800,400);
  1891. gfx_text(guessone,800,450);
  1892. gfx_text(between,800,500);
  1893. //printf("%d\n",score);
  1894. c = gfx_wait();
  1895. gfx_clear();
  1896. gfx_text("Score = You won, it doesn't matter", 800,400);
  1897. gfx_text("Time taken = More than 1 minute", 800,450);
  1898. gfx_text(finalfinal,800,500);
  1899. gfx_wait();
  1900. break;
  1901. }
  1902.  
  1903.  
  1904. else // wrong decision
  1905. {//163
  1906. gfx_clear();
  1907. gfx_color(255,255,255);
  1908. gfx_text(wrong,800,300);
  1909. gfx_text(gg,800,350);
  1910. gfx_text(gameover,800,400);
  1911. gfx_text("Score = redacted", 800,450);
  1912. gfx_text(finish,800,500);
  1913. c = gfx_wait();
  1914. break;
  1915. }//155
  1916. c = gfx_wait();
  1917.  
  1918. }//if
  1919.  
  1920. }//while
  1921.  
  1922.  
  1923. }// program end
  1924.  
  1925. int score_add(int score1)
  1926. {
  1927. score1 = ++score1;
  1928. return(score1);
  1929. }
  1930.  
  1931. int guess_minus(int guess1)
  1932. {
  1933. guess1 = --guess1;
  1934. return(guess1);
  1935. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement