Write a program that displays a moving ASCII ball *
inside a rectangle (20 by 10 chars including border). The ball must not cross the rectangle, e.g. bump off when it hits the wall. The scene must be cleared and redrawn every 0.1 seconds and the ball must move 1 char in x and y direction every frame. The shortest program written in any language wins.
Example output (frame 1)
+------------------+
|* |
| |
| |
| |
| |
| |
| |
| |
+------------------+
Example output (frame 2)
+------------------+
| |
| * |
| |
| |
| |
| |
| |
| |
+------------------+
Example output (frame 8)
+------------------+
| |
| |
| |
| |
| |
| |
| |
| * |
+------------------+
Example output (frame 9)
+------------------+
| |
| |
| |
| |
| |
| |
| * |
| |
+------------------+
1080x1920
resolution :) \$\endgroup\$