/* * (c) Copyright 1995-1999, Igor Tarasov * FidoNet: 2:5020/370.2 620.20 1103.5 * Inet: itarasov@rtuis.miem.edu.ru * Phone: (095)942-50-97 */ #include #include #include #include #include #include #define racket_w 2 #define racket_delta racket_w/2 #define initial_vilocity 0.1 #define radius 0.5 double x, y; double racket_x=0; double vx, vy; double right = 5, left = -5, top = 5, bottom = -5; void CALLBACK Key_LEFT(void ) { if(racket_x>left) racket_x -= racket_delta; } void CALLBACK Key_RIGHT(void ) { if(racket_x+racket_wracket_x && xright) { vx = -vx; x += 2*vx; } if(y+radius>top || (y-radius