I wrote this project for the C++ exam at IT STEP University.
Pong is one of the early arcade video games. This is a tennis sports game using simple 2D graphics.
A small square that replaces a ping-pong ball moves along the screen along a linear path. If it hits the perimeter of the playing field, then its trajectory changes depending on the angle of impact. If the ball is beaten off by the player's racket, then its movement additionally depends on the speed and direction of the racket. Racket control in Pong is carried out using a paddle controller that controls by turning the handle around its axis. The perimeter of the playing field is indicated by the edges of the screen, and the ball cannot leave the field through the top or bottom edge. In the upper part of the field, the scores of the players are displayed, each on their own half of the screen.
The gameplay consists of players moving their rackets vertically to protect their goal. At the beginning of each round, the ball is served to one of the players, and the round continues until one of the players scores a point. This happens when his opponent cannot return the ball.