[ Back to the overview Matrix ]
Test case : Red Ball
Write a little graphical game.
Open a 320x200 graphical display (Window or fullscreen).
It should display :
- a red ball, represented by a filled, red square with 16 pixels size, located on a random position of the screen
- a black hole, represented by a filled, black square with 16 pixels size, located on a random position of the screen
The player can move the red square my pressing e (up), d (right), x (down) and s(left), one pixel per keypress.
If the ball has the same coordinates as the black hole, the game ends.
What is tested: basic grapics access, user input.
Contributed by Andreas Koch, mail at kochandreas.com