- cross-posted to:
- linux@programming.dev
- linux@lemmy.world
- cross-posted to:
- linux@programming.dev
- linux@lemmy.world
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



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.
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 bug is now fixed, its origin was escape code parsing while using the arrow keys: looped three times before getting the input. You can update the script to get the improved version. As I said, it is now fixed, plus the max level of disks is up to 13.
Recursion until hell freezes over.