Ping Pong Game in C Language

I hope you all enjoyed playing Tic-Tac-Toe with us, now its time to play Ping Pong. We will code it in C Language. Ping Pong in C is a simple game to play but not easy to program especially for beginners but dont

worry stay with the tutorial, do what it says and you will be done in no time.

 



Graphic Library Used - Turbo C/C++ BGI

Operating System Used - Windows XP Professional

Requirements:-

Install Turbo C++ 3.0 IDE and install it in folder C:\TC. Thats all now you are all done to start your games programming fantasies.

Getting Started:-


Go to C:\TC\Bin there you will find a executable file called TC execute it and IDE (What is IDE?) will load itself.

Now go to File Menu and choose New.

Now Press F2 to save the file. Give it name pingpong.c.

Now you are all set to rock.

Coding main( )

First thing a program should do is to include header files and to code main() only header we will be needing is graphics.h . Including unnecessary header files increase the size of the code and compile time. Next we

create a parameterless int returning main() with no code at present. Your Code should look like this -

#include <conio.h>

int main ()

{
           

return 0;

}
         

Intializing Graphics

Now we intialise graphics in main(), stop for a key press and then close the graphics. When we stop you should see a blank page and not any error. If you face an error, make sure your installation path is correct. All

our game activity occurs in this opening and closing of graphics. It will generally give you a 640*480 mode with VGA graphics. These graphics are good enough to code any descent looking games. If you get different

settings try to set them as above. Your code should be now -

#include <graphics.h>

int main ()
{
int gdriver = DETECT, gmode;
initgraph(&gdriver, &gmode, "c:\\tc\\bgi");       // Intializes Graphics
getch ();                                                      // Key Press
closegraph ();                                              // Close Graphics
return 0;
}

Game Data

Now we create data our game needs . In this game we need following data -

Score : Player A Score & Player B Score.

Bats : Length, Width, X Coordinate, Old Y Coordinate, New Y Coordinate (Since bat moves only up and down)

Ball : Radius,Speed in X Direction, Speed in Y Direction, Old X center , Old Y center, New X centre, New Y centre

You can change these parameters as you wish to modify your game but changing them may need a alteration in code otherwise it could lead to preety stupid behaviour of game and severe cases a crash (very

unlikely).

Now we use structure to store data and code will be as follow -

#include <graphics.h>

struct bat
{
 int length;
 int width;
 int xcoordinate;
 int new_ycoordinate;
 int old_ycoordinate;
}batA, batB;                  // Create Two Bats For Each User.

struct ball
{
 int radius;
 int speedx;
 int speedy;
 int old_xcenter;
 int old_ycenter;
 int new_xcenter;
 int new_ycenter;
}ball1;

struct score
{
  int score_A;
  int score_B;
}score_game;

int main ()

{
 int gdriver = DETECT, gmode;
 initgraph(&gdriver, &gmode, "c:\\tc\\bgi"); // Intializes Graphics
 getch (); // Key Press
 closegraph (); // Close Graphics
 return 0;
}

Game Initializaton

Now we create a function which intializes all your data and create a board with non moving or static elements permanently and dynamic or moving elements to intial postion. We call this function through main only

once. You can modify parameters here to see the changes. If you are unable to understand what function does press SHIFT + F1 and see in index or you are free to contanct us..

You screen should now look like this -

Ping Pong

Code Now Becomes -

#include <graphics.h>

struct bat
{
 int length;
 int width;
 int xcoordinate;
 int new_ycoordinate;
 int old_ycoordinate;
}batA, batB; // Create Two Bats For Each User.

struct ball
{
 int radius;
 int speedx;
 int speedy;
 int old_xcenter;
 int old_ycenter;
 int new_xcenter;
 int new_ycenter;
}ball1;

struct score
{
  int score_A;
  int score_B;
}score_game;

void initialize () // Initialize the game.

{
 char tempstring [10]; //This String holds score in char format temporarily
 
 //Initialise Bat A
 
 batA.length = 20;
 batA.width = 2;
 batA.xcoordinate = 20;
 batA.new_ycoordinate = 237;
 batA.old_ycoordinate = 237;
 
 // Intialise Bat B
 
 batB.length = 20;
 batB.width = 2;
 batB.xcoordinate = 620;
 batB.new_ycoordinate = 237;
 batB.old_ycoordinate = 237;
 
 // Intialise Ball
 ball1.radius = 3;
 ball1.speedx = 4;
 ball1.speedy = 0;
 ball1.old_xcenter = 320;
 ball1.old_ycenter = 250;
 ball1.new_xcenter = 320;
 ball1.new_ycenter = 250;
 
 // Intialise Score
 score_game.score_A = 0;
 score_game.score_B = 0;
 
 // Set Background to white
 setbkcolor (BLACK);


 // Draw Ball at Initial Position
 setfillstyle (1,15);
 fillellipse (ball1.new_xcenter,ball1.new_ycenter,ball1.radius,ball1.radius);


 // Draw Bats at Intial Position
 bar (batA.xcoordinate,batA.new_ycoordinate,batA.xcoordinate+batA.width,batA.new_ycoordinate+batA.length);
 bar (batB.xcoordinate,batB.new_ycoordinate,batB.xcoordinate+batB.width,batB.new_ycoordinate+batB.length);


 // Display Score
 textcolor ();
 sprintf (tempstring,"A - %d",score_game.score_A);
 outtextxy (10,450,tempstring);
 sprintf (tempstring,"B - %d",score_game.score_A);
 outtextxy (590,450,tempstring);

}

int main ()

{
 int gdriver = DETECT, gmode;
 initgraph(&gdriver, &gmode, "c:\\tc\\bgi"); // Intializes Graphics
 initialize ();
 getch (); // Key Press
 closegraph (); // Close Graphics
 return 0;
}
          

Game Engine


Now we take a big step forward. We move from static to dynamic and we design a game engine for us to do that. Now lets take a overview what is changing.

1. Bats move up and down for both players on thier will.

2. Ball moves between the two bats controlled by computer.

3. Score Changes when a player miss.

We introduce this function in main() and when this function returns the game exit.

All this occurs in our game engine function called play ( ). In this function there is a infinite while loop which exits only when player press exit command (Q Key). Now we discuss each part of game engine in details.


Moving Bats -

We pick four keys 2 for player A up and down and 2 for player B up and down . Let the keys be

A - Player A up

Z - Player A down

J - Player B up

M - Player B down

To check for input we use a function called inportb and for that we need header <dos.h>. We use 0X60 port designated to keyboard.

Then we use a switch case for action to be performed.

Action is performed by a function called movebat() which removes the last picture of the bat and place a new one. It also calculate the new coordinates of bat after moving.

The Code Now becomes -

#include <graphics.h>
#include <dos.h>

struct bat

{
 int length;
 int width;
 int xcoordinate;
 int new_ycoordinate;
 int old_ycoordinate;
}batA, batB; // Create Two Bats For Each User.

struct ball
{
  int radius;
  int speedx;
  int speedy;
  int old_xcenter;
  int old_ycenter;
  int new_xcenter;
  int new_ycenter;
}ball1;

struct score
{
  int score_A;
  int score_B;
}score_game;

void initialize () // Initialize the game.

{
 char tempstring [10]; //This String holds score in char format temporarily
 
 //Initialise Bat A
 batA.length = 20;
 batA.width = 2;
 batA.xcoordinate = 20;
 batA.new_ycoordinate = 237;
 batA.old_ycoordinate = 237;
 
 // Intialise Bat B
 batB.length = 20;
 batB.width = 2;
 batB.xcoordinate = 620;
 batB.new_ycoordinate = 237;
 batB.old_ycoordinate = 237;
 
 // Intialise Ball
 ball1.radius = 3;
 ball1.speedx = 4;
 ball1.speedy = 0;
 ball1.old_xcenter = 320;
 ball1.old_ycenter = 250;
 ball1.new_xcenter = 320;
 ball1.new_ycenter = 250;
 
 // Intialise Score
 score_game.score_A = 0;
 score_game.score_B = 0;
 
 // Set Background to white
 setbkcolor (BLACK);
 
 // Draw Ball at Initial Position
 setfillstyle (1,15);
 fillellipse (ball1.new_xcenter,ball1.new_ycenter,ball1.radius,ball1.radius);
 
 // Draw Bats at Intial Position
 bar (batA.xcoordinate,batA.new_ycoordinate,batA.xcoordinate+batA.width,batA.new_ycoordinate+batA.length);
 bar (batB.xcoordinate,batB.new_ycoordinate,batB.xcoordinate+batB.width,batB.new_ycoordinate+batB.length);
 
 // Display Score
 textcolor ();
 sprintf (tempstring,"A - %d",score_game.score_A);
 outtextxy (10,450,tempstring);
 sprintf (tempstring,"B - %d",score_game.score_A);
 outtextxy (590,450,tempstring);
}

void movebat (char input)

{
 switch (input)
   {
     case 'A' :
                if (batA.new_ycoordinate > 0) // Move only when bat is not touching the top so it doesnt jump out of screen.
                  {
                    batA.old_ycoordinate = batA.new_ycoordinate;
                    batA.new_ycoordinate --;
                    setfillstyle (1,0); // Remove last postion.
                    bar (batA.xcoordinate,batA.old_ycoordinate,batA.xcoordinate+batA.width,batA.old_ycoordinate+batA.length);
                    setfillstyle (1,15); // Display New postion.
                    bar (batA.xcoordinate,batA.new_ycoordinate,batA.xcoordinate+batA.width,batA.new_ycoordinate+batA.length);
                    break;
                  }
    
     case 'Z' :
               if (batA.new_ycoordinate+batA.length < 480) // Make sure bat doesnot go below the screen.
                  {
                    batA.old_ycoordinate = batA.new_ycoordinate;
                    batA.new_ycoordinate ++;
                    setfillstyle (1,0); // Remove last postion.
                    bar (batA.xcoordinate,batA.old_ycoordinate,batA.xcoordinate+batA.width,batA.old_ycoordinate+batA.length);
                    setfillstyle (1,15); // Display New postion.
                    bar (batA.xcoordinate,batA.new_ycoordinate,batA.xcoordinate+batA.width,batA.new_ycoordinate+batA.length);
                    break;
                   }
    
     case 'J' :
               if (batB.new_ycoordinate > 0) // Move only when bat is not touching the top so it doesnt jump out of screen.
                 {
                   batB.old_ycoordinate = batB.new_ycoordinate;
                   batB.new_ycoordinate --;
                   setfillstyle (1,0); // Remove last postion.
                   bar (batB.xcoordinate,batB.old_ycoordinate,batB.xcoordinate+batB.width,batB.old_ycoordinate+batB.length);
                   setfillstyle (1,15); // Display New postion.
                   bar (batB.xcoordinate,batB.new_ycoordinate,batB.xcoordinate+batB.width,batB.new_ycoordinate+batB.length);
                   break;
                 }
   
    case 'M' :
              if (batB.new_ycoordinate+batB.length < 480) // Make sure bat doesnot go below the screen.
                {
                  batB.old_ycoordinate = batB.new_ycoordinate;
                  batB.new_ycoordinate ++;
                  setfillstyle (1,0); // Remove last postion.
                  bar (batB.xcoordinate,batB.old_ycoordinate,batB.xcoordinate+batB.width,batB.old_ycoordinate+batB.length);
                  setfillstyle (1,15); // Display New postion.
                  bar (batB.xcoordinate,batB.new_ycoordinate,batB.xcoordinate+batB.width,batB.new_ycoordinate+batB.length);
                  break;
                }
    
   }

}

void play ()\\ Our Budding Game Engine

{
   while (inportb (0X60) != 16) // Check wether key press is Q if so exit loop
    {
      delay (10); // Reduce game speed to human playable level
      if (inportb (0X60) == 30)  movebat ('A');
      if (inportb (0X60) == 44)  movebat ('Z');
      if (inportb (0X60) == 36)  movebat ('J');
      if (inportb (0X60) == 50)  movebat ('M');
    }
}
           

int main ()

{       
int gdriver = DETECT, gmode;
initgraph(&gdriver, &gmode, "c:\\tc\\bgi"); // Intializes Graphics
initialize ();
play ();                                   // Game Engine
closegraph ();                            // Close Graphics
return 0;
}


Move The Ball


Now since we are done with bat lets move the ball.

If speed of the ball speedx is positive, ball moves in right direction and if speedx of the ball is negative ball moves in left direction.

If speed of the ball speedy is positive, ball moves in up direction and if speedy of the ball is negative ball moves in down direction.

If ball hits the top or bottom its speedy changes sign to bring reflection.

We do this in function called moveball() and call this function in our game engine.

Also we need to make ball behaviour unpredictable so we use srand and rand to intialize ball speed y from 0 - 3 pixel per second and choose two of four adjacent direction to produce any possible direction.. We also

need header time.h for this purpose.

Now code becomes even bigger, dont get scared its easy to understand.

 

#include <graphics.h>
#include <dos.h>
#include <time.h>

struct bat
{

 int length;
 int width;
 int xcoordinate;
 int new_ycoordinate;
 int old_ycoordinate;
}batA, batB; // Create Two Bats For Each User.

struct ball
{
  int radius;
  int speedx;
  int speedy;
  int old_xcenter;
  int old_ycenter;
  int new_xcenter;
  int new_ycenter;
}ball1;

struct score
{
  int score_A;
  int score_B;
}score_game;

void initialize () // Initialize the game.

{
 char tempstring [10]; //This String holds score in char format temporarily
 time_t t;             // Used to generate random number from system time.
       
 //Initialise Bat A
 batA.length = 20;
 batA.width = 2;
 batA.xcoordinate = 20;
 batA.new_ycoordinate = 237;
 batA.old_ycoordinate = 237;
 
 // Intialise Bat B
 batB.length = 20;
 batB.width = 2;
 batB.xcoordinate = 620;
 batB.new_ycoordinate = 237;
 batB.old_ycoordinate = 237;
 
 // Intialise Ball
 ball1.radius = 3;
 ball1.speedx = 2;
 srand((int) time(&t)); // Seed rand a random number
 ball1.speedy = rand ()%3;// Sets speed from 0 to 3 depending upon remainder.
 if (rand() % 2 == 0)
  {
    ball1.speedx = - ball1.speedx; // Generate Random X direction.
    ball1.speedy = - ball1.speedy; // Generate Random Y direction.
  }
 ball1.old_xcenter = 320;
 ball1.old_ycenter = 250;
 ball1.new_xcenter = 320;
 ball1.new_ycenter = 250;

 // Intialise Score
 score_game.score_A = 0;
 score_game.score_B = 0;
 
 // Set Background to white
 setbkcolor (BLACK);
 
 // Draw Ball at Initial Position
 setfillstyle (1,15);
 fillellipse (ball1.new_xcenter,ball1.new_ycenter,ball1.radius,ball1.radius);
 
 // Draw Bats at Intial Position
 bar (batA.xcoordinate,batA.new_ycoordinate,batA.xcoordinate+batA.width,batA.new_ycoordinate+batA.length);
 bar (batB.xcoordinate,batB.new_ycoordinate,batB.xcoordinate+batB.width,batB.new_ycoordinate+batB.length);
 
 // Display Score
 textcolor ();
 sprintf (tempstring,"A - %d",score_game.score_A);
 outtextxy (10,450,tempstring);
 sprintf (tempstring,"B - %d",score_game.score_A);
 outtextxy (590,450,tempstring);
 outtextxy (40,470,"Remove This Line by Learn Coding It yourself at www.cencyclopedia.com");
        
}

void movebat (char input)

{
  switch (input)
      {
         case 'A' :
                   if (batA.new_ycoordinate > 0) // Move only when bat is not touching the top so it doesnt jump out of screen.
                    {
                      batA.old_ycoordinate = batA.new_ycoordinate;
                      batA.new_ycoordinate --;
                      setfillstyle (1,0); // Remove last postion.
                      bar (batA.xcoordinate,batA.old_ycoordinate,batA.xcoordinate+batA.width,batA.old_ycoordinate+batA.length);
                      setfillstyle (1,15); // Display New postion.
                      bar (batA.xcoordinate,batA.new_ycoordinate,batA.xcoordinate+batA.width,batA.new_ycoordinate+batA.length);
                    }
                    break;
         case 'Z' :
                   if (batA.new_ycoordinate+batA.length < 430) // Make sure bat doesnot go below the screen.
                    {
                      batA.old_ycoordinate = batA.new_ycoordinate;
                      batA.new_ycoordinate ++;
                      setfillstyle (1,0); // Remove last postion.
                      bar (batA.xcoordinate,batA.old_ycoordinate,batA.xcoordinate+batA.width,batA.old_ycoordinate+batA.length);
                      setfillstyle (1,15); // Display New postion.
                      bar (batA.xcoordinate,batA.new_ycoordinate,batA.xcoordinate+batA.width,batA.new_ycoordinate+batA.length);
                    }
                    break;
         case 'J' :
                   if (batB.new_ycoordinate > 0) // Move only when bat is not touching the top so it doesnt jump out of screen.
                    {
                      batB.old_ycoordinate = batB.new_ycoordinate;
                      batB.new_ycoordinate --;
                      setfillstyle (1,0); // Remove last postion.
                      bar (batB.xcoordinate,batB.old_ycoordinate,batB.xcoordinate+batB.width,batB.old_ycoordinate+batB.length);
                      setfillstyle (1,15); // Display New postion.
                      bar (batB.xcoordinate,batB.new_ycoordinate,batB.xcoordinate+batB.width,batB.new_ycoordinate+batB.length);
                    }
                    break;

          case 'M' :
                   if (batB.new_ycoordinate+batB.length < 430) // Make sure bat doesnot go below the screen.
                    {
                      batB.old_ycoordinate = batB.new_ycoordinate;
                      batB.new_ycoordinate ++;
                      setfillstyle (1,0); // Remove last postion.
                      bar (batB.xcoordinate,batB.old_ycoordinate,batB.xcoordinate+batB.width,batB.old_ycoordinate+batB.length);
                      setfillstyle (1,15); // Display New postion.
                      bar (batB.xcoordinate,batB.new_ycoordinate,batB.xcoordinate+batB.width,batB.new_ycoordinate+batB.length);
                    }
                    break;

         }


}

void moveball ()

{
  ball1.old_xcenter = ball1.new_xcenter;
  ball1.old_ycenter = ball1.new_ycenter;
  ball1.new_xcenter = ball1.new_xcenter + ball1.speedx;
  ball1.new_ycenter = ball1.new_ycenter + ball1.speedy;
  setcolor (0);
  setfillstyle (1,0);// Remove last postion.
  fillellipse (ball1.old_xcenter,ball1.old_ycenter,ball1.radius,ball1.radius);
  setfillstyle (1,15); // Display New postion.
  fillellipse (ball1.new_xcenter,ball1.new_ycenter,ball1.radius,ball1.radius);
  if ( ball1.new_ycenter - ball1.radius < 0 ) ball1.speedy = -ball1.speedy; // Reflect From Top
  if ( ball1.new_ycenter + ball1.radius > 430 ) ball1.speedy = -ball1.speedy; // Reflect From Bottom

}

void play ()

{
  while (inportb (0X60) != 16) // Check wether key press is Q if so exit loop
    {
      delay (10); // Reduce game speed to human playable level
      if (inportb (0X60) == 30)  movebat ('A');
      if (inportb (0X60) == 44)  movebat ('Z');
      if (inportb (0X60) == 36)  movebat ('J');
      if (inportb (0X60) == 50)  movebat ('M');
      moveball ();
     }
}
           

int main ()

{
  int gdriver = DETECT, gmode;
  initgraph(&gdriver, &gmode, "c:\\tc\\bgi"); // Intializes Graphics
  initialize ();
  play (); // Game Engine
  closegraph (); // Close Graphics
  return 0;
}

 
Physics Processor

Another most important part of any game is physics processor . It calculates the physics in our game bring real world similarities.

In this Simple Game Physics is not this complicated but when we build 3D Game togther it is far more complicated than graphics.

Now we Analyse what physics do we need here -

1. When ball hit left or right of the screen it reflects itself if their is bat there or bring itself to the centre and increment the score.

Now we can modify our intialize function a little and little bit of main this can be achieved as a piece of cake without tough programming. What we do is we dont initialize score in intialize function but in main so that

intialize function can be called again without reseting score. Also we need to a closegraph and renitialise graphic in initialize function.

Because of above we can now remove the burden of intializing graphics from main making program more efficient. Hence we hit two targets in one arrow.

We create a function called physics() to do this for us.

Now we present the final code of this version -

#include <graphics.h>
#include <dos.h>
#include <time.h>

struct bat
{
 int length;
 int width;
 int xcoordinate;
 int new_ycoordinate;
 int old_ycoordinate;
}batA, batB; // Create Two Bats For Each User.

struct ball
{
 int radius;
 int speedx;
 int speedy;
 int old_xcenter;
 int old_ycenter;
 int new_xcenter;
 int new_ycenter;
}ball1;

struct score
{
  int score_A;
  int score_B;
}score_game;
           

void initialize () // Initialize the game.

{
  int gdriver = DETECT, gmode;
  char tempstring [10]; //This String holds score in char format temporarily
  time_t t;// Used to generate random number from system time.
  closegraph ();
  initgraph(&gdriver, &gmode, "c:\\tc\\bgi"); // Intializes Graphics
 
  //Initialise Bat A
  batA.length = 40;
  batA.width = 2;
  batA.xcoordinate = 20;
  batA.new_ycoordinate = 237;
  batA.old_ycoordinate = 237;
 
  // Intialise Bat B
  batB.length = 40;
  batB.width = 2;
  batB.xcoordinate = 620;
  batB.new_ycoordinate = 237;
  batB.old_ycoordinate = 237;
 
   // Intialise Ball
   ball1.radius = 3;
   ball1.speedx = 2;
   srand((int) time(&t)); // Seed rand a random number
   ball1.speedy = rand ()%1;// Sets speed from 0 to 2 depending upon remainder.
   if (rand() % 2 == 0)
     {
       ball1.speedx = - ball1.speedx; // Generate Random X direction.
       ball1.speedy = - ball1.speedy; // Generate Random Y direction.
      }
    ball1.old_xcenter = 320;
    ball1.old_ycenter = 250;
    ball1.new_xcenter = 320;
    ball1.new_ycenter = 250;
  
   // Set Background to white
   setbkcolor (BLACK);
  
   // Draw Ball at Initial Position
   setfillstyle (1,15);
   fillellipse (ball1.new_xcenter,ball1.new_ycenter,ball1.radius,ball1.radius);
 
   // Draw Bats at Intial Position
   bar (batA.xcoordinate,batA.new_ycoordinate,batA.xcoordinate+batA.width,batA.new_ycoordinate+batA.length);
   bar (batB.xcoordinate,batB.new_ycoordinate,batB.xcoordinate+batB.width,batB.new_ycoordinate+batB.length);
 
   // Display Score
   textcolor ();
   sprintf (tempstring,"A - %d",score_game.score_A);
   outtextxy (10,450,tempstring);
   sprintf (tempstring,"B - %d",score_game.score_B);
   outtextxy (590,450,tempstring);
   outtextxy (40,472,"Remove This Line by Learn Coding It yourself at www.cencyclopedia.com");
}

void movebat (char input)

{
  switch (input)
     {
       case 'A' :
                  if (batA.new_ycoordinate > 0) // Move only when bat is not touching the top so it doesnt jump out of screen.
                    {
                      batA.old_ycoordinate = batA.new_ycoordinate;
                      batA.new_ycoordinate --;
                      setfillstyle (1,0); // Remove last postion.
                      bar (batA.xcoordinate,batA.old_ycoordinate,batA.xcoordinate+batA.width,batA.old_ycoordinate+batA.length);
                      setfillstyle (1,15); // Display New postion.
                      bar (batA.xcoordinate,batA.new_ycoordinate,batA.xcoordinate+batA.width,batA.new_ycoordinate+batA.length);
                     }
                   break;

       case 'Z' :
                  if (batA.new_ycoordinate+batA.length < 430) // Make sure bat doesnot go below the screen.
                    {
                      batA.old_ycoordinate = batA.new_ycoordinate;
                      batA.new_ycoordinate ++;
                      setfillstyle (1,0); // Remove last postion.
                      bar (batA.xcoordinate,batA.old_ycoordinate,batA.xcoordinate+batA.width,batA.old_ycoordinate+batA.length);
                      setfillstyle (1,15); // Display New postion.
                      bar (batA.xcoordinate,batA.new_ycoordinate,batA.xcoordinate+batA.width,batA.new_ycoordinate+batA.length);
                    }
                  break;
       case 'J' :
                  if (batB.new_ycoordinate > 0) // Move only when bat is not touching the top so it doesnt jump out of screen.
                     {
                      batB.old_ycoordinate = batB.new_ycoordinate;
                      batB.new_ycoordinate --;
                      setfillstyle (1,0); // Remove last postion.
                      bar (batB.xcoordinate,batB.old_ycoordinate,batB.xcoordinate+batB.width,batB.old_ycoordinate+batB.length);
                      setfillstyle (1,15); // Display New postion.
                      bar (batB.xcoordinate,batB.new_ycoordinate,batB.xcoordinate+batB.width,batB.new_ycoordinate+batB.length);
                     }
                  break;

        case 'M' :
                  if (batB.new_ycoordinate+batB.length < 430) // Make sure bat doesnot go below the screen.
                    {
                      batB.old_ycoordinate = batB.new_ycoordinate;
                      batB.new_ycoordinate ++;
                      setfillstyle (1,0); // Remove last postion.
                      bar (batB.xcoordinate,batB.old_ycoordinate,batB.xcoordinate+batB.width,batB.old_ycoordinate+batB.length);
                      setfillstyle (1,15); // Display New postion.
                      bar (batB.xcoordinate,batB.new_ycoordinate,batB.xcoordinate+batB.width,batB.new_ycoordinate+batB.length);
                    }
                   break;
         }
        
}

void moveball ()

{
   ball1.old_xcenter = ball1.new_xcenter;
   ball1.old_ycenter = ball1.new_ycenter;
   ball1.new_xcenter = ball1.new_xcenter + ball1.speedx;
   ball1.new_ycenter = ball1.new_ycenter + ball1.speedy;
   setcolor (0);
   setfillstyle (1,0); // Remove last postion.
   fillellipse (ball1.old_xcenter,ball1.old_ycenter,ball1.radius,ball1.radius);
   setfillstyle (1,15); // Display New postion.
   fillellipse (ball1.new_xcenter,ball1.new_ycenter,ball1.radius,ball1.radius);
   if ( ball1.new_ycenter - ball1.radius < 0 ) ball1.speedy = -ball1.speedy; // Reflect From Top
   if ( ball1.new_ycenter + ball1.radius > 430 ) ball1.speedy = -ball1.speedy; // Reflect From Bottom
}

void physics ()

{
  char tempstring [10];
  if ( ball1.new_xcenter - ball1.radius <= 20)
     {
         if (ball1.new_ycenter > batA.new_ycoordinate && ball1.new_ycenter < batA.new_ycoordinate+batA.length)
            {
               ball1.speedx = - ball1.speedx;
               ball1.speedy = rand () % 2;// Sets speed from 0 to 2 depending upon remainder.
               if (rand() % 2 == 0) ball1.speedy = - ball1.speedy; // Generate Random Y direction.
             }
          else // Reintialize entire game with new score
             {
               score_game.score_B ++;
               initialize ();
             }
          return;
      }

  if ( ball1.new_xcenter +  ball1.radius > 620)
    
      {
         if (ball1.new_ycenter > batB.new_ycoordinate && ball1.new_ycenter < batB.new_ycoordinate+batB.length)
          {
            ball1.speedx = - ball1.speedx;
            ball1.speedy = rand ()%2;// Sets speed from 0 to 2 depending upon remainder.
            if (rand() % 2 == 0) ball1.speedy = - ball1.speedy; // Generate Random Y direction.
           }
         else // Reintialize game with new score
          {
           score_game.score_A ++;
           initialize ();
          }
           return;
       }
}

void play ()

{
  while (inportb (0X60) != 16) // Check wether key press is Q if so exit loop
     {
       delay (10); // Reduce game speed to human playable level
       if (inportb (0X60) == 30)  movebat ('A');
       if (inportb (0X60) == 44)  movebat ('Z');
       if (inportb (0X60) == 36)  movebat ('J');
       if (inportb (0X60) == 50)  movebat ('M');
       moveball ();
       physics ();
      }
}
           

int main ()

{
  score_game.score_A = 0;// Intialise score in Main This Time
  score_game.score_B = 0;// It improves Efficiency
  initialize ();
  play (); // Game Engine
  closegraph (); // Close Graphics
  return 0;
}

 

So thats all for now.
Report any bug if you find and do post your Queries and Suggestion.
Enjoy...Happy Gaming:)

Comments

Member since:
7 July 2017
Last activity:
2 weeks 2 days



2017.7.7yangping

coach outlet

moncler

mbt shoes

cheap jerseys from china

christian louboutin shoes

coach outlet online

kate spade

michael kors outlet clearance

nike free run flyknit

marc jacobs bags

fit flops

coach factory outlet

kate spade handbags

kd 9 shoes

cheap oakley sunglasses

nike air max 90

chi flat iron

kate spade outlet

longchamp handbags

hermes bags

ralph lauren outlet

coach outlet

salomon shoes

burberry outlet store

coach outlet online

christian louboutin sale

michael kors outlet

polo outlet

coach outlet online

nike free flyknit

air max

nike store

louboutin uk

houston texans jerseys

coach outlet

coach factory outlet

coach factory outlet

louis vuitton outlet

air jordan retro

levis jeans

polo ralph lauren outlet online

oakley sunglasses

moncler outlet

mont blanc

adidas nmd

true religion outlet

fit flops

steph curry shoes

cheap jordans

ralph lauren pas cher

michael kors outlet clearance

fitflops sale clearance

cheap nike shoes

coach outlet store

pandora charms sale

coach outlet

mont blanc pens

cheap mlb jerseys

coach factory outlet

ralph lauren outlet online

michael kors outlet online

birkenstock pas cher

coach factory outlet online

cheap nfl jerseys wholesale

michael kors outlet

polo ralph lauren outlet online

toms shoes outlet

pandora charms sale clearance

air jordans

ed hardy

ed hardy clothing

pandora charms

mont blanc pens

adidas superstar

mulberry purse

nike shoes for men

nike air max outlet

nike store

true religion

hermes handbags

celine outlet

cheap ray ban sunglasses

oakley sunglasses

ralph lauren sale clearance

adidas yeezy

borse gucci

louis vuitton handbags outlet

fitflops

michael kors bags

true religion jeans

louis vuitton outlet

oakley sunglasses

christian louboutin sale

christian louboutin

doudoune moncler

michael kors outlet

michael kors outlet

michael kors outlet clearance

versace shoes

louis vuitton outlet online

coach outlet

mulberry handbags

columbia shoes

pandora jewelry outlet

red bottoms shoes

ralph lauren

yeezy boost 350

pandora outlet

birkenstock sandals

christian louboutin

coach outlet

nike air max

parker pens

longchamp bags

vans shoes

yeezy boost

ralph lauren sale clearance

birkenstocks

nike roshe run

hollister clothing store

adidas pas cher

dansko sandals

discount oakley sunglasses

oakley sunglasses

hermes handbags

adidas yeezy

adidas yeezy

polo ralph lauren

james harden shoes

ralph lauren uk

hermes birkin

pandora

coach outlet

mlb jerseys cheap

true religion outlet

longchamp uk

coach outlet store online clearances

fendi handbags

rolex replica

sac longchamp pas cher

michael kors outlet

coach outlet

dansko shoes

dansko outlet store

gucci outlet

nike air max

christian louboutin outlet

wholesale nike shoes

adidas shoes

coach bags

jordan shoes

kate spade outlet

sac longchamp

nike outlet

coach factory outlet

coach factory outlet

tory burch outlet

ray ban sunglasses

birkenstock shoes

ralph lauren uk

vans outlet store

nike shoes

oakley sunglasses

adidas nmd

ralph lauren outlet

coach outlet

michael kors outlet clearance

adidas yeezy

tory burch outlet

michael kors uk

birkenstock sandals

cheap jordans

birkenstocks

clarks outlet

christian louboutin outlet

salomon shoes outlet

rolex replica watches

new england patriots jerseys

ray ban sunglasses discount

ralph lauren uk

fred perry polo

yeezy boost 350 v2

cheap mont blanc

rolex watches

swarovski crystal

true religion jeans

sac michael kors

fitflops

birkenstock shoes

ralph lauren sale clearance

cheap nfl jerseys

coach outlet

jimmy choo

mbt shoes

michael kors handbags

michael kors outlet

coach factory outlet

coach factory outlet

oakley sunglasses outlet

adidas yeezy

ralph lauren outlet

sac longchamp pas cher

coach outlet

adidas shoes

adidas shoes

ralph lauren outlet

michael kors handbags

oakley sunglasses outlet

louboutin pas cher

pandora jewelry

hermes outlet

hermes handbags

polo ralph lauren outlet

gucci outlet

pandora outlet

coach outlet

fitflops

clarks outlet

coach outlet

michael kors

cheap jerseys

kevin durant shoes

valentino shoes outlet

kate spade outlet store

tods outlet

birkenstock sandals

nike shoes

burberry outlet canada

cheap jordan shoes

coach factory outlet

red bottoms

michael kors outlet store

michael kors outlet online

jordan shoes

louboutin

toms shoes

adidas uk

golden state warriors jerseys

cheap jordans

mulberry outlet

pandora bijoux

adidas superstar

michael kors outlet

cheap oakley sunglasses

coach factory outlet

ralph lauren uk

ed hardy

pandora jewelry

pandora uk

coach outlet

coach factory outlet

fendi handbags

tory burch outlet store

adidas superstar shoes

adidas nmd

pandora bracelet

dolce and gabbana outlet

yeezy boost 350

longchamp handbags

yeezy boost

coach factory outlet

cheap nike air max

adidas outlet

ralph lauren

nike outlet online

adidas superstar

polo ralph lauren

polo ralph lauren

louboutin chaussures

coach outlet store

supra shoes

polo ralph lauren

adidas yeezy boost 350

nike free 5.0

giuseppe zanotti outlet

pandora charms

fake rolex

louis vuitton outlet store

michael kors handbags

air jordan uk

polo outlet

nike shoes outlet

michael kors canada

coach factory outlet

pandora jewelry

pandora charms uk

oakley sunglasses

coach outlet

adidas shoes

yeezy boost

cat shoes

dallas cowboys jerseys

clarks shoes

fred perry

sac longchamp pliage

nike outlet store

toms outlet

christian louboutin outlet

nike outlet

coach outlet

air max 95

nmd adidas

swarovski jewellery

jordans

mbt shoes

fitflops sale clearance

ralph lauren outlet

kate spade handbags

fitflops

michael kors canada

cheap jordans

nike air max

official coach factory outlet

longchamp bags

toms shoes outlet

moncler jackets

michael kors outlet

marc jacobs handbags

birkenstock sandals

nmd adidas

burberry sale

coach handbags

adidas shoes

pandora uk

mlb jerseys wholesale

michael kors outlet

ecco shoes

pandora jewelry

coach outlet

moncler outlet

michael kors handbags

celine outlet store

pandora jewelry

swarovski crystal

michael kors handbags

ultra boost

true religion jeans

coach factory outlet online

nmd shoes

nmd adidas

birkenstock outlet

polo ralph lauren

seattles eahawks jerseys

polo ralph lauren

coach outlet

mont blanc

cheap jordans

louboutin shoes

kate spade handbags

coach outlet store

cheap mlb jerseys

ray ban sunglasses

coach outlet store

oakley sunglasses

polo ralph lauren outlet online

adidas uk

longchamp uk

adidas outlet

fitflops shoes

nike air max 90

air max 2017

cheap ray bans

coach factory outlet

mulberry bags

salomon shoes

longchamp outlet store

cheap jordans

cheap mlb jerseys

nike air max

under armour shoes

valentino shoes

adidas shoes

ray ban sunglasses

coach outlet

nike outlet

michael kors outlet

hollister co

discount ray ban sunglasses

nike factory store

red bottoms

adidas yeezy boost

michael kors bags

louis vuitton handbags

christian louboutin

rolex replica watches

michael kors uk

kate spade outlet

fitflops uk

burberry outlet

true religion outlet

michael kors handbags

pandora soldes

christian louboutin shoes

yeezy boost 350

louis vuitton outlet

parada handbags

burberry outlet

columbia outlet online

coach factory outlet

coach outlet store online

michael kors outlet

coach outlet

cveland cavaliers jerseys

polo ralph lauren outlet

yeezy 350 boost

louis vuitton outlet

pandora charms

ray ban sunglasses

christian louboutin

miami heat jerseys

ralph lauren sale clearance

fred perry

kate spade outlet

adidas shoes

rolex watches

adidas nmd

nike roshe

coach outlet

birkenstock sandals

valentino

rayban

dansko outlet

christian louboutin outlet

cheap nfl jerseys

clarks shoes

timberland boots

ralph lauren outlet

pandora charms

nike air max 90

replica watches

ralph lauren outlet online

cheap jordans

mulberry handbags

adidas trainers

red bottoms shoes

longchamp outlet

pandora outlet

pandora charms

ralph lauren clearance

oakley sunglasses

yeezy boost 350

cheap jordans free shipping

longchamp outlet

adidas superstar

michael kors outlet online

michael kors outlet clearance

michael kors handbags

burberry outlet online

mulberry uk

michael kors outlet

pandora charms

moncler jackets

kate spade handbags

michael kors outlet

toms shoes

michael kors uk

tods shoes

ysl handbags

coach outlet store

michael kors

coach outlet store

coach canada

giuseppe zanotti sneakers

coach outlet

nike air max pas cher

nike air max

adidas outlet

nike free run black

longchamp uk

denver broncos jerseys

cheap oakley sunglasses

michael kors handbags

adidas nmd

adidas outlet

pandora jewelry

yeezy boost

prada outlet

longchamp handbags

fitflops

fitflop sandals

coach outlet store

yeezy boost 350

nike store

Member since:
9 February 2017
Last activity:
9 weeks 1 day

Basketball Jerseys Outlet

beat headphones

Nike Air Max TN

oakley frogskins glasses

pandora bracelet uk

prada bags

louis vuitton outlet

pandora bracelet

Basketball Jerseys Outlet

oakley glasses

kate spade bags

ray ban wayfarer

chrome store uk

canada goose coats

michael kors outlet online

Hockey Jerseys Outlet

prada uk

pandora necklaces

nike air max 95

shop mlb

major league baseball

nfl store near me

pandora uk

Shopping Online

louis vuitton outlet

michael kors uk

michael kors canada

pandora charms uk

Mens Sunglasses

Tiffany

louis vuitton factory outlet

burberry canada

nba mock draft

burberry outlet

authentic prada outlet online

prada outlet

Dreamland Jewelry - Official

Prada Shoes - Official

Prada bags

nike running

kate spade handbags

nike outlet

michael kors tote

Nike Air Jordan

north face outlet

Clothing

ugg boots uk

Burberry Shirt - Official

coach handbags

Mizuno Running Shoes

oakley frogskins sunglasses

chrome store

Oakley Sunglasses

prada outlet online

michael kors bags outlet

myhermes

pandora bracelet charms

coach outlet us

michael kors outlet online

louis vuitton handbags

prada bags outlet

burberry

michael kors outlet online

myhermes parcel shop

Nike Zoom

mlb store

chrome store

Gift

pandora bracelet

ray ban sunglasses

moncler outlet

canada goose sale

ugg uk

nfl schedule

pandora uk

mlb jerseys

mlb shop

ray ban sunglasses

michael kors outlet

nike air huarache

balenciaga outlet

shoes online sale

michael kors factory outlet

official

coach australia

prada bags

snow boots

polo outlet

salomon hiking shoes

Ray Ban Outlet

Burberry Australia

kate spade outlet online

michael kors online

coach outlet

prada bag

Oakley Australia

chrome hearts earrings

KD 8 shoes

Tiffany and Co.

Pandora Bracelet - Official

Hugo Boss Online

oakley australia

kate spade

nflshop com

Sports

Football Jerseys Outlet

prada outlet

adidas australia

mens sunglasses

ugg boots

Table

coach tennis shoes

rayban prescription

payless shoe source

kate spade handbags

ralph lauren australia

shoes sale

pandora bracelets charms

TCO

michael kors bags

nba score

michael kors us

coach crossbody

moncler outlet

yeezy boost 350 white

michael kors bags

balenciaga bag

Online Marketing

chrome store

nfl jerseys

kate spade

nike outlet

coach online

michael kors

Nike Free Run

Jewelry

Wedding Rings- Official

pandora bracelet

Zales Jewelry

prada men

beats studio

prada outlet prices

moncler men jackets

Oakley Australia

prada outlet

chrome store canada

louis vuitton outlet

prada wallet men

longchamp outlet

payless shoe

Salomon Speedcross Shoes

sunglasses

coach factory outlet

kate spade

Products Made in China

payless shoe store

hermes parcel

coach carter

pandora.com

pandora rings uk

Jewelry Armoire - Official

north face outlet sale

Flatware

pandora charms sale

pandora deutschland

Jewelry

coach factory outlet

uggs outlet

pandora sale

oakley holbrook glasses

mcm factory outlet

Coach Australia

Prada Shoes - Official

prada sunglasses

ray-ban aviator

pandora uk

Wine

pandora uk

yeezy boost 350

Gift Card

prada outlet online

prada saffiano

ray ban aviator

chrome hearts outlet

michael kors wallet

piumini moncler replica

Prada Sunglasses - Official

rayban eyeglasses

prada outlet california

Cheap Ray Ban

moncler jacket

pandora charms sale

coach outlet usa

pandoracharms

hermes belt

online shoes

ray-ban glasses

Ray Ban Australia

dre beats

pandora earrings

Coach Bags

nike shox

Nike Air Jordan

moncler clothing

ray ban sunglasses

pandora necklace charms

air jordan shoes

nike huarache shoes

nike shoes

pandora rings

Nike Free

kate spade black friday

louis vuitton outlet online

ray-ban outlet

Nike Air Max

coach outlet online

payless shoe store near me

ua shoes

louis vuitton outlet online

prada bags prices

Dinnerware

Prada Sunglasses - Official

ray-ban aviator

pandora earrings

prada online

Diamonds

pandora rings

Mobile Phones

louis vuitton outlet

pandora sale

balenciaga us

kate spade newyork

prada handbags

michael kors outlet

louis vuitton us

tracking ups

pandora rings

ray ban prescription sunglasses

celine factory outlet

michael kors bags

louis vuitton

homepage keywords

chrome hearts

ray ban wayfarer sunglasses

michael kors

kate spade bags

tiffany and co

coach outlet

authentic shoes

Nike Air Jordan

oakley frogskins

michael kors handbags

coach outlet

moncler jacket

michael kors outlet online

salomon sneakers

michael kors outlet

ugg boots sale

michael kors handbags

coach outlet

michael kors online

Sunglasses for men

prada outlet bags

moncler jacket

top sunglasses

adidas shoes australia

ray ban uk

nike air

burberry outlet

prada sale

coach bags

prada handbags

MIZUNO Shop US

coach outlet

balenciaga bags

kate spade online

louboutin shoes

coach

pandora jewelry

prada bags on sale

nfl fan shop

michael kors uk online

prada outlet price

ray ban aviator sunglasses

Nike Free Run

louis vuitton

kate spade canada

ups com tracking

michael kors australia official

ralph lauren polo

Wedding Registry

michael kors outlet

Nike Hyperdunk 2015

louis vuitton outlet

mlb.com

nike id

mk outlet

kate spade black friday

MIZUNO Shop On Line

brand sunglasses

prada outlet

prada outlet nj

Accessories

kate spade italian

shoes online

Engagement Rings - Official

prada clearance sale

michael kors

Nike Dunk SB Low

Oakley Sunglasses

coach outlet online

Oakley glasses

ray ban polarized sunglasses

prada bags

pandora rings

Mizuno Wave

sunglasses hut

pandora rings

ugg uk

michael kors outlet

nfl shop com

chanel australia

ups tracking number

christian louboutin shoes

Nike Free

polo online

michael kors outlet

prada bags

kate spade handbags

kate spade bags

2015 Nike Dunk

pandora bracelet

kate spade

abercrombie canada

moncler down jackets

ugg slippers uk

louis vuitton outlet online

Home

jordan shoes

ray ban online

michael kors shoes

discount nfl jerseys

louis vuitton outlet online

coach outlet

rayban prescription glasses

gel kayano

Coach Outlet Store

nike air max 2013

Watches

Sterling Silver Flatware

shoes online

Minisinbox

coach australia

ups shipping

nike shoes

official rayban

nfl store nyc

nba finals

sunglasses sm

north face outlet online

Nike Air Jordan

salomon mens shoes

kate spade outlet

burberry outlet online

nike air max

coach shoes

rayban sunglasses

kate spade bags outlet

yeezy boost 350

sunglass hut

Air Jordan

coach outlet online sale

pandora australia

Jimmy Choo Australia

pandora charm bracelet

Kay Jewelers - Official

michael kors outlet online

nba store

michael kors outlet clearance

coach purses

coach factory outlet online

prada outlet

Nike Air Jordan

ray-ban wayfarer

chanel bag

Prada Outlet

kate spade bags

my hermes tracking

Promise Rings - Official

Abercrombie Fitch

hermes handbags

moncler us

mcm outlet

prada outlet online

coach outlet

Jared Jewelry - Official

ray-ban sunglasses

Michael Kors Outlet

nike huarache

kate spade outlet

mlb jerseys

michael kors outlet

brand sunglasses

spades uk

tiffany co

snow boots uk

beats by dr dre

dr dre beats

pandora charms

pandora charms 2016

Wave Prophecy 2 Shoes

pandora charms cheap sale

snow boots

ray ban new wayfarer

nfl shop coupon code

ray ban polarized

boots

wayfarer sunglasses

CHanel Factory Outlet

tiffany and co

official prada site

nfl store

pandora rings

Nike Air Max

tiffany australia

louis vuitton factory outlet

coach watches

beats by dre headphones

polo outlet online

Air Jordan

pandora charms uk

prada outlet

kate spade outlet

pandora jewelry charms

Football Jerseys Outlet

Diamond Rings - Official

ugg slippers

pandora necklace

Mizuno Shop Japan

nike free shoes

Chanel bags Outlet

Shoes

ray ban sunglasses

classic

kate spade purses

michael kors outlet

chrome hearts

pandora jewelry

Mizuno Shop

moncler down Jackets

pandora rings uk

prada purses

yeezy boost 350 black

chrome hearts jewelry rings

Nike Air Max Lunar

prada outlet

ray ban prescription glasses

Jewelry Armoire - Official

louis vuitton australia

prada outlet online

burberry purse

payless boots

huaraches shoes

nike air max

beats headphones

celine outlet online

coach shoes

burberry outlet canada

coach outlet online

kate spade outlet

burberry outlet online

nbastore

Gift Certificate

Jordan Flight 45 Femme

burberry online

kate spade outlet online

michael kors outlet

Coach outlet online

coach usa online

official prada site

canada goose jacket

Birkin Bag Hermes

Longchamp Outlet

China Wholesale

michael kors outlet

Hyperdunk 2016

prada outlet bags

beats audio

payless sandals

pandora rings

payless shoes near me

canada goose outlet

nike shox

Nike Air Jordan

coach bags

pandora jewelry

coach australia

chrome hearts

canada goose mens

prada outlet texas

chrome hearts jewelry

coach usa

nike australia

coach sunglasses

adidas yeezy boost 350

coach outlet online

louis vuitton factory outlet

rayban glasses

sunglasses store

pandora charms sale clearance

pandora jewelry

michael kors bags

2017 Nike Air Max

pandora jewelry

coach wallets

Longchamp Sale

michael kors shoes

Air Jordan

rayban sunglasses

canada goose jacket

prada us

coach outlet online

nfl pro shop

Mizuno Shoes

ray ban

nike store

the beat

coach outlet store

ray-ban eyeglasses

michael kors factory outlet

ray ban new wayfarer sunglasses

pandora online

Cheap coach purses

ray ban sunglasses

ray ban sunglasses

nike com

michael kors outlet

nike shox

adidas shoes

Vase

michael kors bags

nike free

ups ground tracking

nfl apparel

Dreamland Jewelry - Official

michael kors outlet online

official chrome hearts

michael kors outlet

canada goose kensington parka

louis vuitton factory outlet

Hugo Boss Store

nfl shop

Nike Air Jordan

prada bags 2016

chrome hearts jewelry rings

michael kors wallet

pandora charms

payless shoes online

chrome hearts outlet

prada outlet store near me

official michael kors

rayban wayfarer

Nike Air Jordan

adidas australia

michael kors

sunglasses online

nba jerseys

pandora bracelet charms

celine outlet

beats by dre studio

pandora australia

pandora charms

pandora bracelet

michael kors outlet

kate spade online outlet

michael kors purses

kate spade italy

coach outlet

pandora charms

cheap mlb jerseys

coach outlet online

prada bags outlet

Air Max

louis vuitton purses

nba shop

huaraches

ugg

pandora charms sale clearance

michael kors outlet

coach outlet

chrome store

prada bags

kate spade handbags

chrome store

coach shoes for women

ray ban wayfarer

pandora bracelet charms

Drinkware

nba schedule

hermes uk

ups tracking

pandora bracelet

tiffany australia

prada outlet online

Nike Zoom

pandora australia

yeezy boost 350 shoes

payless coupons

Air Max

Tiffany And Co

pandora rings uk

rayban sunglasses

michael kors uk online

Wave Prophecy 2 Shoes

kate spade uk

coach factory outlet

nba scores

chrome hearts

coach factory

michael kors australia

adidas

michael kors outlet online

prada sale

Home Accessories

chrome hearts jewelry for men

prada online

michael kors bags outlet

pandora jewelry

coach outlet online

moncler outlet

pandora charm bracelet

michael kors tote

pandora app

Salomon Running Shoes

michael kors watches

pandora charms

shop mlb

Nike Air Max

pandora bracelet

louis vuitton online sale

kate spade wallet

burberry australia

prada official site

mlb clothing

Jimmy Choo Shoes

ray ban aviator

softball jerseys

pandora sale

ugg

prada shoes for men

Michael Kors

pandora bracelet

sunglasses

ray ban outlet

coach outlet

ray ban eyeglasses

Salomon Shoes

coach outlet online

moncler jackets

Air jordan Femme 2015

prada outlet bags

ups freight tracking

Canada Goose Outlet

coach outlet online

adidas yeezy boost

Gift Registry

Oakley Sunglasses

Hermes Outlet

Hugo Boss Outlet

michael kors watches

prada outlet online

mk outlet online

coach handbags

salomon shoes

michael kors bags outlet

Abercrombie Nederland

asics gel kayano

prada handbags

kate spade handbags

Phones

pandora earrings

burberry scarf

pandora uk

michael kors handbags

louis vuitton australia

pandora jewelry sale

kate spade

Nike Free

michael kors

coach outlet online

mlb store

payless shoes coupons

christian louboutin uk

louis vuitton 80% off

mcm outlet online

hermes parcel shop

official kate spade website

nike air max

louis vuitton bags

Coach Handbags

Air Jordan

payless shoes

prada outlet online sale

pandora official site

coach handbags outlet

Coach Sunglasses Outlet

prada outlet

rayban outlet

burberry australia

oakley holbrook sunglasses

Jared Jewelry - Official

nike air max

nba standings

coach handbags sale

coach outlet

beats by dre

mlb news

official michael kors

import sunglasses

yeezy boost 350 Pink

michael kors

louis vuitton australia

fox fur

Air Max

ray ban glasses

ray ban clubmaster sunglasses

michael kors online

cheap ray ban sunglasses

pandora rings

sunglasses outlet

dr beats

drum beats

Ray Ban sunglasses

chrome hearts jewelry

asics gel

pandora charms

oakley sunglasses

kate spade outlet online

nbashop

my herm茅s

pandora necklace

michael kors outlet

pandora charms

nike air max 90

michael kors outlet

Wedding

pandora charms sale

Home

nike free run shoes

Jordan Aero Mania Homme

ray ban wayfarer

dr dre headphones

adidas shoes

coach outlet online

coach factory

pandora bracelets

coach factory outlet

Kate Spade - Online Sale

coach outlet

kate spade outlet store

prada outlet sale

BURBERRYburberry australia

pandora outlet

huarache nike

nike jordan shoes

Brighton Jewelry - Official

mlb apparel

north face sale

burberry scarf

pandora bracelet

pandora charms

michael kors

coach totes

Nike Jordans

Sunglasses outlet sale

pandora jewelry

burberry online

Air Max

burberry scarfs

kate spade black friday

prada factory outlet

ray ban sunglasses

longchamp outlet online

pandora jewelry

michael kors purses

prada handbags

prada online

Longchamp tote

oakley glasses

yeezy boost

Phones case

Ray Ban Outlet store

nike outlet

chrome hearts us

michael kors uk

kate spade

rayban aviator

michael kors outlet bags

Baseball Jerseys Outlet

Mizuno Shop Japan

pandora rings

Coach Outlet

chrome hearts jewelry

prada online

michael kors outlet online

salomon boots

baseball jerseys

prada bags

ugg australia

poly sunglasses

burberry outlet

coach factory outlet

Nike Hyperdunk Shoes

michael kors outlet

chrome hearts

rayban prescription sunglasses

pandora uk

Company

prada outlet woodbury

ray-Ban sunglasses

chanel

ray ban clubmaster

Nike KD 8

coach factory outlet

beat maker

coach factory outlet

louis vuitton bags

chrome hearts earrings

michael kors outlet online

ray ban sunglasses

Tiffany Co

pandora bracelets

cheap moncler jacket

michael kors factory outlet

mlb shop

oakley holbrook.

coach outlet

chrome hearts canda

andora charms cheap sale

rap beats

Coach Outlet Online

tiffany co

prada outlet online

Baseball Jerseys Outelt

michael kors outlet online

Electronics

nba playoffs

nike shoes

pandora charms

Nike Air Max

burberry us

pandora charms 2016

prada outlet online

kate spade outlet

Nike Air Max

prada glasses

nba store nyc

michael kors outlet

kate spade UK

Abercrombie Outlet

Watches

Chanel Outlet

louis vuitton

Nike Jordan Shoes

prada sale

China Manufacturers

kate spade wallet outlet

asics kayano

beats dr dre

Bridal Registry

Michael Kors Canada

hermes bag

moncler coats

moncler sale

canada goose sale online

pandora charms

louis vuitton sale

michael kors outlet

Premier Jewelry. - Official

coach sunglasses for women

kate spade outlet

Nike Air Max

chrome hearts uk sale

prada bags

pandora rings

official coach outlet site

pandora rings

burberry outlet

Prada Sunglasses - Official

mlb com shop

Kevin Durant Shoes

Hermes Belt

kate spade bags

rayban aviator

kate spade outlet

Brighton Jewelry - Official

asics shoes australia

michael kors bags

China Suppliers

Premier Jewelry - Official

Nike Free Run

ugg boots

me adc5.20

Member since:
9 February 2017
Last activity:
9 weeks 1 day

Basketball Jerseys Outlet

beat headphones

Nike Air Max TN

oakley frogskins glasses

pandora bracelet uk

prada bags

louis vuitton outlet

pandora bracelet

Basketball Jerseys Outlet

oakley glasses

kate spade bags

ray ban wayfarer

chrome store uk

canada goose coats

michael kors outlet online

Hockey Jerseys Outlet

prada uk

pandora necklaces

nike air max 95

shop mlb

major league baseball

nfl store near me

pandora uk

Shopping Online

louis vuitton outlet

michael kors uk

michael kors canada

pandora charms uk

Mens Sunglasses

Tiffany

louis vuitton factory outlet

burberry canada

nba mock draft

burberry outlet

authentic prada outlet online

prada outlet

Dreamland Jewelry - Official

Prada Shoes - Official

Prada bags

nike running

kate spade handbags

nike outlet

michael kors tote

Nike Air Jordan

north face outlet

Clothing

ugg boots uk

Burberry Shirt - Official

coach handbags

Mizuno Running Shoes

oakley frogskins sunglasses

chrome store

Oakley Sunglasses

prada outlet online

michael kors bags outlet

myhermes

pandora bracelet charms

coach outlet us

michael kors outlet online

louis vuitton handbags

prada bags outlet

burberry

michael kors outlet online

myhermes parcel shop

Nike Zoom

mlb store

chrome store

Gift

pandora bracelet

ray ban sunglasses

moncler outlet

canada goose sale

ugg uk

nfl schedule

pandora uk

mlb jerseys

mlb shop

ray ban sunglasses

michael kors outlet

nike air huarache

balenciaga outlet

shoes online sale

michael kors factory outlet

official

coach australia

prada bags

snow boots

polo outlet

salomon hiking shoes

Ray Ban Outlet

Burberry Australia

kate spade outlet online

michael kors online

coach outlet

prada bag

Oakley Australia

chrome hearts earrings

KD 8 shoes

Tiffany and Co.

Pandora Bracelet - Official

Hugo Boss Online

oakley australia

kate spade

nflshop com

Sports

Football Jerseys Outlet

prada outlet

adidas australia

mens sunglasses

ugg boots

Table

coach tennis shoes

rayban prescription

payless shoe source

kate spade handbags

ralph lauren australia

shoes sale

pandora bracelets charms

TCO

michael kors bags

nba score

michael kors us

coach crossbody

moncler outlet

yeezy boost 350 white

michael kors bags

balenciaga bag

Online Marketing

chrome store

nfl jerseys

kate spade

nike outlet

coach online

michael kors

Nike Free Run

Jewelry

Wedding Rings- Official

pandora bracelet

Zales Jewelry

prada men

beats studio

prada outlet prices

moncler men jackets

Oakley Australia

prada outlet

chrome store canada

louis vuitton outlet

prada wallet men

longchamp outlet

payless shoe

Salomon Speedcross Shoes

sunglasses

coach factory outlet

kate spade

Products Made in China

payless shoe store

hermes parcel

coach carter

pandora.com

pandora rings uk

Jewelry Armoire - Official

north face outlet sale

Flatware

pandora charms sale

pandora deutschland

Jewelry

coach factory outlet

uggs outlet

pandora sale

oakley holbrook glasses

mcm factory outlet

Coach Australia

Prada Shoes - Official

prada sunglasses

ray-ban aviator

pandora uk

Wine

pandora uk

yeezy boost 350

Gift Card

prada outlet online

prada saffiano

ray ban aviator

chrome hearts outlet

michael kors wallet

piumini moncler replica

Prada Sunglasses - Official

rayban eyeglasses

prada outlet california

Cheap Ray Ban

moncler jacket

pandora charms sale

coach outlet usa

pandoracharms

hermes belt

online shoes

ray-ban glasses

Ray Ban Australia

dre beats

pandora earrings

Coach Bags

nike shox

Nike Air Jordan

moncler clothing

ray ban sunglasses

pandora necklace charms

air jordan shoes

nike huarache shoes

nike shoes

pandora rings

Nike Free

kate spade black friday

louis vuitton outlet online

ray-ban outlet

Nike Air Max

coach outlet online

payless shoe store near me

ua shoes

louis vuitton outlet online

prada bags prices

Dinnerware

Prada Sunglasses - Official

ray-ban aviator

pandora earrings

prada online

Diamonds

pandora rings

Mobile Phones

louis vuitton outlet

pandora sale

balenciaga us

kate spade newyork

prada handbags

michael kors outlet

louis vuitton us

tracking ups

pandora rings

ray ban prescription sunglasses

celine factory outlet

michael kors bags

louis vuitton

homepage keywords

chrome hearts

ray ban wayfarer sunglasses

michael kors

kate spade bags

tiffany and co

coach outlet

authentic shoes

Nike Air Jordan

oakley frogskins

michael kors handbags

coach outlet

moncler jacket

michael kors outlet online

salomon sneakers

michael kors outlet

ugg boots sale

michael kors handbags

coach outlet

michael kors online

Sunglasses for men

prada outlet bags

moncler jacket

top sunglasses

adidas shoes australia

ray ban uk

nike air

burberry outlet

prada sale

coach bags

prada handbags

MIZUNO Shop US

coach outlet

balenciaga bags

kate spade online

louboutin shoes

coach

pandora jewelry

prada bags on sale

nfl fan shop

michael kors uk online

prada outlet price

ray ban aviator sunglasses

Nike Free Run

louis vuitton

kate spade canada

ups com tracking

michael kors australia official

ralph lauren polo

Wedding Registry

michael kors outlet

Nike Hyperdunk 2015

louis vuitton outlet

mlb.com

nike id

mk outlet

kate spade black friday

MIZUNO Shop On Line

brand sunglasses

prada outlet

prada outlet nj

Accessories

kate spade italian

shoes online

Engagement Rings - Official

prada clearance sale

michael kors

Nike Dunk SB Low

Oakley Sunglasses

coach outlet online

Oakley glasses

ray ban polarized sunglasses

prada bags

pandora rings

Mizuno Wave

sunglasses hut

pandora rings

ugg uk

michael kors outlet

nfl shop com

chanel australia

ups tracking number

christian louboutin shoes

Nike Free

polo online

michael kors outlet

prada bags

kate spade handbags

kate spade bags

2015 Nike Dunk

pandora bracelet

kate spade

abercrombie canada

moncler down jackets

ugg slippers uk

louis vuitton outlet online

Home

jordan shoes

ray ban online

michael kors shoes

discount nfl jerseys

louis vuitton outlet online

coach outlet

rayban prescription glasses

gel kayano

Coach Outlet Store

nike air max 2013

Watches

Sterling Silver Flatware

shoes online

Minisinbox

coach australia

ups shipping

nike shoes

official rayban

nfl store nyc

nba finals

sunglasses sm

north face outlet online

Nike Air Jordan

salomon mens shoes

kate spade outlet

burberry outlet online

nike air max

coach shoes

rayban sunglasses

kate spade bags outlet

yeezy boost 350

sunglass hut

Air Jordan

coach outlet online sale

pandora australia

Jimmy Choo Australia

pandora charm bracelet

Kay Jewelers - Official

michael kors outlet online

nba store

michael kors outlet clearance

coach purses

coach factory outlet online

prada outlet

Nike Air Jordan

ray-ban wayfarer

chanel bag

Prada Outlet

kate spade bags

my hermes tracking

Promise Rings - Official

Abercrombie Fitch

hermes handbags

moncler us

mcm outlet

prada outlet online

coach outlet

Jared Jewelry - Official

ray-ban sunglasses

Michael Kors Outlet

nike huarache

kate spade outlet

mlb jerseys

michael kors outlet

brand sunglasses

spades uk

tiffany co

snow boots uk

beats by dr dre

dr dre beats

pandora charms

pandora charms 2016

Wave Prophecy 2 Shoes

pandora charms cheap sale

snow boots

ray ban new wayfarer

nfl shop coupon code

ray ban polarized

boots

wayfarer sunglasses

CHanel Factory Outlet

tiffany and co

official prada site

nfl store

pandora rings

Nike Air Max

tiffany australia

louis vuitton factory outlet

coach watches

beats by dre headphones

polo outlet online

Air Jordan

pandora charms uk

prada outlet

kate spade outlet

pandora jewelry charms

Football Jerseys Outlet

Diamond Rings - Official

ugg slippers

pandora necklace

Mizuno Shop Japan

nike free shoes

Chanel bags Outlet

Shoes

ray ban sunglasses

classic

kate spade purses

michael kors outlet

chrome hearts

pandora jewelry

Mizuno Shop

moncler down Jackets

pandora rings uk

prada purses

yeezy boost 350 black

chrome hearts jewelry rings

Nike Air Max Lunar

prada outlet

ray ban prescription glasses

Jewelry Armoire - Official

louis vuitton australia

prada outlet online

burberry purse

payless boots

huaraches shoes

nike air max

beats headphones

celine outlet online

coach shoes

burberry outlet canada

coach outlet online

kate spade outlet

burberry outlet online

nbastore

Gift Certificate

Jordan Flight 45 Femme

burberry online

kate spade outlet online

michael kors outlet

Coach outlet online

coach usa online

official prada site

canada goose jacket

Birkin Bag Hermes

Longchamp Outlet

China Wholesale

michael kors outlet

Hyperdunk 2016

prada outlet bags

beats audio

payless sandals

pandora rings

payless shoes near me

canada goose outlet

nike shox

Nike Air Jordan

coach bags

pandora jewelry

coach australia

chrome hearts

canada goose mens

prada outlet texas

chrome hearts jewelry

coach usa

nike australia

coach sunglasses

adidas yeezy boost 350

coach outlet online

louis vuitton factory outlet

rayban glasses

sunglasses store

pandora charms sale clearance

pandora jewelry

michael kors bags

2017 Nike Air Max

pandora jewelry

coach wallets

Longchamp Sale

michael kors shoes

Air Jordan

rayban sunglasses

canada goose jacket

prada us

coach outlet online

nfl pro shop

Mizuno Shoes

ray ban

nike store

the beat

coach outlet store

ray-ban eyeglasses

michael kors factory outlet

ray ban new wayfarer sunglasses

pandora online

Cheap coach purses

ray ban sunglasses

ray ban sunglasses

nike com

michael kors outlet

nike shox

adidas shoes

Vase

michael kors bags

nike free

ups ground tracking

nfl apparel

Dreamland Jewelry - Official

michael kors outlet online

official chrome hearts

michael kors outlet

canada goose kensington parka

louis vuitton factory outlet

Hugo Boss Store

nfl shop

Nike Air Jordan

prada bags 2016

chrome hearts jewelry rings

michael kors wallet

pandora charms

payless shoes online

chrome hearts outlet

prada outlet store near me

official michael kors

rayban wayfarer

Nike Air Jordan

adidas australia

michael kors

sunglasses online

nba jerseys

pandora bracelet charms

celine outlet

beats by dre studio

pandora australia

pandora charms

pandora bracelet

michael kors outlet

kate spade online outlet

michael kors purses

kate spade italy

coach outlet

pandora charms

cheap mlb jerseys

coach outlet online

prada bags outlet

Air Max

louis vuitton purses

nba shop

huaraches

ugg

pandora charms sale clearance

michael kors outlet

coach outlet

chrome store

prada bags

kate spade handbags

chrome store

coach shoes for women

ray ban wayfarer

pandora bracelet charms

Drinkware

nba schedule

hermes uk

ups tracking

pandora bracelet

tiffany australia

prada outlet online

Nike Zoom

pandora australia

yeezy boost 350 shoes

payless coupons

Air Max

Tiffany And Co

pandora rings uk

rayban sunglasses

michael kors uk online

Wave Prophecy 2 Shoes

kate spade uk

coach factory outlet

nba scores

chrome hearts

coach factory

michael kors australia

adidas

michael kors outlet online

prada sale

Home Accessories

chrome hearts jewelry for men

prada online

michael kors bags outlet

pandora jewelry

coach outlet online

moncler outlet

pandora charm bracelet

michael kors tote

pandora app

Salomon Running Shoes

michael kors watches

pandora charms

shop mlb

Nike Air Max

pandora bracelet

louis vuitton online sale

kate spade wallet

burberry australia

prada official site

mlb clothing

Jimmy Choo Shoes

ray ban aviator

softball jerseys

pandora sale

ugg

prada shoes for men

Michael Kors

pandora bracelet

sunglasses

ray ban outlet

coach outlet

ray ban eyeglasses

Salomon Shoes

coach outlet online

moncler jackets

Air jordan Femme 2015

prada outlet bags

ups freight tracking

Canada Goose Outlet

coach outlet online

adidas yeezy boost

Gift Registry

Oakley Sunglasses

Hermes Outlet

Hugo Boss Outlet

michael kors watches

prada outlet online

mk outlet online

coach handbags

salomon shoes

michael kors bags outlet

Abercrombie Nederland

asics gel kayano

prada handbags

kate spade handbags

Phones

pandora earrings

burberry scarf

pandora uk

michael kors handbags

louis vuitton australia

pandora jewelry sale

kate spade

Nike Free

michael kors

coach outlet online

mlb store

payless shoes coupons

christian louboutin uk

louis vuitton 80% off

mcm outlet online

hermes parcel shop

official kate spade website

nike air max

louis vuitton bags

Coach Handbags

Air Jordan

payless shoes

prada outlet online sale

pandora official site

coach handbags outlet

Coach Sunglasses Outlet

prada outlet

rayban outlet

burberry australia

oakley holbrook sunglasses

Jared Jewelry - Official

nike air max

nba standings

coach handbags sale

coach outlet

beats by dre

mlb news

official michael kors

import sunglasses

yeezy boost 350 Pink

michael kors

louis vuitton australia

fox fur

Air Max

ray ban glasses

ray ban clubmaster sunglasses

michael kors online

cheap ray ban sunglasses

pandora rings

sunglasses outlet

dr beats

drum beats

Ray Ban sunglasses

chrome hearts jewelry

asics gel

pandora charms

oakley sunglasses

kate spade outlet online

nbashop

my herm茅s

pandora necklace

michael kors outlet

pandora charms

nike air max 90

michael kors outlet

Wedding

pandora charms sale

Home

nike free run shoes

Jordan Aero Mania Homme

ray ban wayfarer

dr dre headphones

adidas shoes

coach outlet online

coach factory

pandora bracelets

coach factory outlet

Kate Spade - Online Sale

coach outlet

kate spade outlet store

prada outlet sale

BURBERRYburberry australia

pandora outlet

huarache nike

nike jordan shoes

Brighton Jewelry - Official

mlb apparel

north face sale

burberry scarf

pandora bracelet

pandora charms

michael kors

coach totes

Nike Jordans

Sunglasses outlet sale

pandora jewelry

burberry online

Air Max

burberry scarfs

kate spade black friday

prada factory outlet

ray ban sunglasses

longchamp outlet online

pandora jewelry

michael kors purses

prada handbags

prada online

Longchamp tote

oakley glasses

yeezy boost

Phones case

Ray Ban Outlet store

nike outlet

chrome hearts us

michael kors uk

kate spade

rayban aviator

michael kors outlet bags

Baseball Jerseys Outlet

Mizuno Shop Japan

pandora rings

Coach Outlet

chrome hearts jewelry

prada online

michael kors outlet online

salomon boots

baseball jerseys

prada bags

ugg australia

poly sunglasses

burberry outlet

coach factory outlet

Nike Hyperdunk Shoes

michael kors outlet

chrome hearts

rayban prescription sunglasses

pandora uk

Company

prada outlet woodbury

ray-Ban sunglasses

chanel

ray ban clubmaster

Nike KD 8

coach factory outlet

beat maker

coach factory outlet

louis vuitton bags

chrome hearts earrings

michael kors outlet online

ray ban sunglasses

Tiffany Co

pandora bracelets

cheap moncler jacket

michael kors factory outlet

mlb shop

oakley holbrook.

coach outlet

chrome hearts canda

andora charms cheap sale

rap beats

Coach Outlet Online

tiffany co

prada outlet online

Baseball Jerseys Outelt

michael kors outlet online

Electronics

nba playoffs

nike shoes

pandora charms

Nike Air Max

burberry us

pandora charms 2016

prada outlet online

kate spade outlet

Nike Air Max

prada glasses

nba store nyc

michael kors outlet

kate spade UK

Abercrombie Outlet

Watches

Chanel Outlet

louis vuitton

Nike Jordan Shoes

prada sale

China Manufacturers

kate spade wallet outlet

asics kayano

beats dr dre

Bridal Registry

Michael Kors Canada

hermes bag

moncler coats

moncler sale

canada goose sale online

pandora charms

louis vuitton sale

michael kors outlet

Premier Jewelry. - Official

coach sunglasses for women

kate spade outlet

Nike Air Max

chrome hearts uk sale

prada bags

pandora rings

official coach outlet site

pandora rings

burberry outlet

Prada Sunglasses - Official

mlb com shop

Kevin Durant Shoes

Hermes Belt

kate spade bags

rayban aviator

kate spade outlet

Brighton Jewelry - Official

asics shoes australia

michael kors bags

China Suppliers

Premier Jewelry - Official

Nike Free Run

ugg boots

me adc5.20

Member since:
13 October 2010
Last activity:
6 years 40 weeks

hey r u using at89s52??

Member since:
20 September 2010
Last activity:
6 years 44 weeks

what do you mean by "Now we intialise graphics in main(), stop for a key press and then close the graphics."????
i did'nt really understand this statement stop for a key press.

Member since:
5 September 2010
Last activity:
6 years 44 weeks

first bug on line 35

Member since:
10 August 2010
Last activity:
6 years 49 weeks

Hi there,

I am using a 8051 microcontroller to create this game. i am using LEDs as the ball and pushbuttons as the bat. Say for example i have 5 pushbuttons and pushbutton 1 and 5 are the bets while the rest are for other commands. How do i modify this program to make this possible. Please give me a head start as i am confused at the moment.