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
[–] 4 points 1 month ago (2 children)

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.

  • source
  • parent
  • hideshow 4 child comments
  • [–] [S] 2 points 1 month ago (1 child)

    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.

  • source
  • parent
  • hideshow 2 child comments
  • [–] [S] 1 point 1 month 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.

  • source
  • parent