Historical background: TV Game Box was an ancestor of PlayStation. It was a box connected to common TV and equipped with one or two joysticks. Most commonly played game was tennis for two players -- see Figure 1.
Write a program which will simulate TV Game Box on a personal computer. The playing-field is composed from two adjacent squares -- one for each player. One player is simulated by the computer. Human player can control his bat by mouse or using the keyboard depending on his selection. Both ways can be used simultaneously. The bat can be moved in both vertical and horizontal direction. The program will not allow to place the bat outside of the playing-field.
Before the game starts it is possible to set width of the bat as a percentage of the playing-field side length. Points are counted according to the normal tennis rules. The score is continuously displayed. The program will evaluate wins and losses.
The program takes into account dynamics of strike, rotated balloons, air resistance and whatever else you think is appropriate.
In addition to a single player mode following game modes are supported:
Double is made difficult by splitting partners playing area into four quadrants (see Figure 2). In one quadrant there can be only one player at the same time.