Langton's ant on the command-line, written in C with ncurses.
git clone https://github.com/mcmangini/c-langtons-ant.git
cd c-langtons-ant/src
make
./langtons_ant [OPTION] [PATTERN]
-d <direction>- Specify ant's starting direction
Lorl(left)Rorr(right)Uoru(up)Dord(down)
- Specify ant's starting direction
-h, --help- Display usage message
Pattern is a string between two and sixteen characters in length. The length of pattern determines the number of colors used by the ant. Each character represents a rule for a specific color. For example, the pattern LRRL means:
- Turn left on a tile of color one (black)
- Turn right on a tile of color two (white)
- Turn right on a tile of color three (blue)
- Turn left on a tile of color four (green)
Tiles change color in a cyclical fashion (black -> white -> blue -> green -> black).
Valid pattern characters are:
Lorl(left turn)Rorr(right turn)Uoru(u-turn)Norn(none)
q- Quitp- Pause/Resumer- Restart1- Slow ant speed2- Medium ant speed3- Fast ant speedArrow keys- Pan around grida- Center antc- Center grid
- RL
- RLLR
- LRRRRRLLR
- RRLLLRLLLRRR