JS Worm v1.42
This is a clone of the classic Unix game 'Worm', originally distributed with
Berkeley Software Distribution (BSD) Unix in the 1980s.
Worm is originally by Michael Toy of UC Santa Cruz, and this clone by me, Joshua
Braun, is released under an MIT Open Source License and dedicated to Alex Braun.
This version of Worm, while faithful to the classic, is a clone rather than a
port of the original code—mostly because I figured it'd be more fun to reverse
engineer the game than to rework the original source.
The "Modern Terminal Emulator" backdrop is a public domain image from
From the original:
You are a little worm, your body is the "o"'s on the screen and your head is the
"@". You move with the hjkl keys (as in the game snake). If you don't press any
keys, you continue in the direction you last moved. The upper case HJKL keys
move you as if you had pressed several (9 for HL and 5 for JK) of the
corresponding lower case key (unless you run into a digit, then it stops).
On the screen you will see a digit, if your worm eats the digit is will grow
longer, the actual amount longer depends on which digit it was that you ate. The
object of the game is to see how long you can make the worm grow.
The game ends when the worm runs into either the sides of the screen, or itself.
The current score (how much the worm has grown) is kept in the upper right corner
of the screen.
Some additional notes:
As in the original game, the arrow keys will also work to move your worm. Other
Unix commands will work here, too, such as Ctrl-z to suspend (pause) the game,
and Ctrl-c to kill the process (quit the game). The navigation menu options can
be accessed using the Alt key in combination with the underlined character (e.g,
Alt-i for this text). Have fun!
The MIT License (MIT)
Copyright (c) 2013 Joshua Braun
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.