Details
Snake is a video game in which the player controls a snake-like creature
that grows longer as it consumes objects scattered on the screen. When the
ever-growing creature collides with obstacles, terrain boundaries, or
itself, the game is over.
Each argument is a series of the creature's movements: left,
right, and forward, denoted by L, R, and
F respectively. The snake always starts its track in the upper left
corner, facing east. Furthermore, it never intersects itself and leaves no
terrain along the north and west sides, both of which would end the game.
For example, FFFRFFLFFFFLFLFF
indicates the snake's movements
are:
- Move three cells forward
- Turn right, facing south
- Move two cells forward
- Turn left, facing east
- Move four cells forward
- Turn left, facing north
- Move one cell forward
- Turn left, facing west
- Move two cells forward
Using hashes, the aforementioned trail is visualized as follows:
####
# ###
#####
For each argument, print the creature's trail, separated by newlines, and
print an additional hash on the terrain square that concludes each trail.
05AB1E is an experimental language, no solutions will be saved.
Please leave feedback on the
GitHub issue.
ALGOL 68 is an experimental language, no solutions will be saved.
Please leave feedback on the
GitHub issue.
APL is an experimental language, no solutions will be saved.
Please leave feedback on the
GitHub issue.
Arturo is an experimental language, no solutions will be saved.
Please leave feedback on the
GitHub issue.
Befunge is an experimental language, no solutions will be saved.
Please leave feedback on the
GitHub issue.
BQN is an experimental language, no solutions will be saved.
Please leave feedback on the
GitHub issue.
CJam is an experimental language, no solutions will be saved.
Please leave feedback on the
GitHub issue.
CoffeeScript is an experimental language, no solutions will be saved.
Please leave feedback on the
GitHub issue.
Egel is an experimental language, no solutions will be saved.
Please leave feedback on the
GitHub issue.
Erlang is an experimental language, no solutions will be saved.
Please leave feedback on the
GitHub issue.
Fennel is an experimental language, no solutions will be saved.
Please leave feedback on the
GitHub issue.
Groovy is an experimental language, no solutions will be saved.
Please leave feedback on the
GitHub issue.
Harbour is an experimental language, no solutions will be saved.
Please leave feedback on the
GitHub issue.
Hare is an experimental language, no solutions will be saved.
Please leave feedback on the
GitHub issue.
Haxe is an experimental language, no solutions will be saved.
Please leave feedback on the
GitHub issue.
Hush is an experimental language, no solutions will be saved.
Please leave feedback on the
GitHub issue.
Hy is an experimental language, no solutions will be saved.
Please leave feedback on the
GitHub issue.
iogii is an experimental language, no solutions will be saved.
Please leave feedback on the
GitHub issue.
Odin is an experimental language, no solutions will be saved.
Please leave feedback on the
GitHub issue.
Picat is an experimental language, no solutions will be saved.
Please leave feedback on the
GitHub issue.
Racket is an experimental language, no solutions will be saved.
Please leave feedback on the
GitHub issue.
Rebol is an experimental language, no solutions will be saved.
Please leave feedback on the
GitHub issue.
Rexx is an experimental language, no solutions will be saved.
Please leave feedback on the
GitHub issue.
Scala is an experimental language, no solutions will be saved.
Please leave feedback on the
GitHub issue.
Squirrel is an experimental language, no solutions will be saved.
Please leave feedback on the
GitHub issue.
Stax is an experimental language, no solutions will be saved.
Please leave feedback on the
GitHub issue.
Uiua is an experimental language, no solutions will be saved.
Please leave feedback on the
GitHub issue.
Vyxal is an experimental language, no solutions will be saved.
Please leave feedback on the
GitHub issue.