83
submitted 19 hours ago by christos@lemmy.world to c/linux@lemmy.ml

https://gitlab.com/christosangel/hanoi

Hanoi is a simple terminal version of the known classical game Tower of Hanoi, written in Bash.

During the game, the user can move left and right, pick disks and drop them in other stacks.

The aim is to move all the disks from the ORIGIN pile to the DESTINATION pile, in as little moves as possible

hanoi.png

you are viewing a single comment's thread
view the rest of the comments
[-] Marty_TF@lemmy.zip 3 points 17 hours ago* (last edited 17 hours ago)

bcs u dont need to put one hand on the arrow keys and have to use the other hand for the rest of the keyboard or alternatively jump around with ur hands

of course this isnt a huge factor in a little game but vim people are used to it. i was sceptical of vim keybinding at first but then i started using it and dam it is true that it's superior

[-] 7eter@feddit.org 4 points 17 hours ago

Agreed! But I also noticed a significant performance difference (in the time that the game take to update the selected stack). It might be due to my lack in cli-gaming, but I never noticed something like that before.

[-] christos@lemmy.world 1 points 11 hours ago

You noticed correctly, I made the trade off because I wanted to have an extra disk level available (10 instead of 9), but I believe it was not worth it. I updated the script, it is now quite snappier I think, check it out if you wish, and let me know what you think.

Thanks for the feedback.

this post was submitted on 10 Jun 2026
83 points (100.0% liked)

Linux

65692 readers
502 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 7 years ago
MODERATORS