Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/itsnickbarry/hanoi-lol
The ubiquitous puzzle, in machine- and lolcat-readable format 🏗️
https://github.com/itsnickbarry/hanoi-lol
architecture lol wow
Last synced: about 2 months ago
JSON representation
The ubiquitous puzzle, in machine- and lolcat-readable format 🏗️
- Host: GitHub
- URL: https://github.com/itsnickbarry/hanoi-lol
- Owner: ItsNickBarry
- License: mit
- Created: 2015-03-25T08:33:53.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-05-24T03:25:18.000Z (over 9 years ago)
- Last Synced: 2023-02-28T11:35:51.370Z (almost 2 years ago)
- Topics: architecture, lol, wow
- Language: LOLCODE
- Homepage:
- Size: 146 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Towers of Hanoi, in LOLCODE
This repository contains an implementation of [Towers of Hanoi][hanoi] in [LOLCODE][lolcode], the alleged language of LOLCATS.The code is amusingly [human-readable][code].
To run it, use Justin Meza's LOLCODE interpreter, [lci][lci].
## Highlights
Comments in LOLCODE are expressed in an unassuming manner:
```lolcode
BTW too heavy
```Nobody can be expected to read multi-line comments:
```lolcode
OBTW
The main game loop.Very fun.
TLDR
```One must be polite to the LOLCODE interpreter:
```lolcode
HAI 1.2
BTW code goes here
KTHXBYE
```Because LOLCODE does not support arrays, the states of the towers are represented by strings:
```lolcode
I HAS A TOWERLEFT ITZ "SMALLMEDIUMBIG"
I HAS A TOWERMIDDLE ITZ "EMPTY"
I HAS A TOWERRIGHT ITZ "EMPTY"
```Because LOLCODE does not support string manipulation beyond concatenation, "WTF?" statements are required to determine the state of the towers and act accordingly:
```lolcode
FROM, WTF?
OMG "SMALLMEDIUMBIG"
NEWFROM R "MEDIUMBIG"
GTFO
OMG "MEDIUMBIG"
NEWFROM R "BIG"
GTFO
OMG "SMALLBIG"
NEWFROM R "BIG"
GTFO
OMG "SMALLMEDIUM"
NEWFROM R "MEDIUM"
GTFO
OMG "SMALL"
NEWFROM R "EMPTY"
GTFO
OMG "MEDIUM"
NEWFROM R "EMPTY"
GTFO
OMG "BIG"
NEWFROM R "EMPTY"
GTFO
OMG "EMPTY"
GTFO BTW this shouldn't happen
OIC
```[code]: ./lib/hanoi.lol
[hanoi]: https://en.wikipedia.org/wiki/Tower_of_Hanoi
[lolcode]: https://en.wikipedia.org/wiki/LOLCODE
[lci]: https://github.com/justinmeza/lci