Remarks: Variations in BASIC
From Maze
(Difference between revisions)
(→Two Walls) | (→Corners and Diagonals) | ||
| Line 29: | Line 29: | ||
<code>10 PRINT CHR$(204+(RND(1)+.5)*3); : GOTO 10</code> | <code>10 PRINT CHR$(204+(RND(1)+.5)*3); : GOTO 10</code> | ||
| − | A simplification of the program above involves dropping the "INT" function, so that the program chooses at random not only between characters 204 and 207, the two corners; it can also choose the two characters in between. These characters happen to be 205 and 206, the ╲ and ╱ characters which are invoked by 10 PRINT. The result does not have the clear structure of the 10 PRINT maze, but is compelling in its confusion of elements. | + | A simplification of the program above involves dropping the "INT" function, so that the program chooses at random not only between characters 204 and 207, the two corners; it can also choose the two characters in between. These characters happen to be 205 and 206, the ╲ and ╱ characters which are invoked by 10 PRINT. The result does not have the clear structure of the 10 PRINT maze, and its pathways run for shorter stretches and seem to be blocked more frequently. Nevertheless, it is somewhat compelling in its confusion of elements. |
= Four Walls = | = Four Walls = | ||
