The game should look like this on starting - Image1
The game should look like this at the end of each round - Image2
A small video for this game is provided below - Image3
GAME RULES:
Ping Pong Game Send Feedback Get ready to get a big task for this assignment. Ever heard of 'Ping Pong'? You might have; if not go search on the web. Well, we will be making a smaller and easier version of this game. The main points for the game are -
- There will be 2 rods at the top and bottom of the screen.
- Both rods will be controlled with the same keys. In other words, they will move together.
- When the game starts, an alert should be shown about the highest score and the player who scored it. If there is no such record, say 'this is your first time'.
- If the score becomes highest, then store the name and max-score in local storage.
- After every round, when one wins an alert will be displayed showing the winning player and his score. Screenshots and a small gif is provided but first let us go through some rules for this game -
- Every round should start when the 'Enter' key is pressed. ( You can use another key as well )
- The rods will only move horizontally using the 'a' and 'd' keys. ( You can use other keys as well )
- The losing rod will get the ball for the next match and the rods and ball will move to center.
- The score will be counted from the start of every match.