Guest User

Untitled

a guest
Feb 19th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.75 KB | None | 0 0
  1.  
  2. #include "DarkGDK.h"
  3.  
  4. void DarkGDK() {
  5.     int x,y;
  6.  
  7.     x = dbRND(640);
  8.     y = dbRND(340);
  9.  
  10.     dbBox(x, y, x + 50, y + 50);
  11.  
  12.     int Pegx;
  13.     int Pegy;
  14.     dbPrint("Find the center point. Ender a x coordinate");
  15.         Pegx = atoi(dbInput());
  16.     dbPrint("Find the center point. Ender a y coordinate");
  17.         Pegy = atoi(dbInput());
  18.    
  19.     while (Pegx != x && Pegy != y)
  20.     {
  21.         dbCLS();
  22.         dbBox(x, y, x + 50, y + 50);
  23.         dbCircle(Pegx,Pegy,25);
  24.  
  25.         if(Pegx == x && Pegy == y)
  26.         {   dbPrint("CONGRATULATIONS YOU WIN!!");
  27.            
  28.        
  29.             dbWaitKey();
  30.         }
  31.         else {
  32.             dbPrint("Find the center point. Ender a x coordinate");
  33.             Pegx = atoi(dbInput());
  34.             dbPrint("Find the center point. Ender a y coordinate");
  35.             Pegy = atoi(dbInput());
  36.         }
  37.  
  38.  
  39.  
  40.        
  41.  
  42.        
  43.     }
  44.  
  45.        
  46.    
  47.  
  48.  
  49.  
  50.  
  51.    
  52. }
Add Comment
Please, Sign In to add comment