cross-posted from: https://lemmy.world/post/47988648

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
[–] 1 point 5 months ago (3 children)

I might be just tired, but it took me a stupidly long second to get that minimum number of moves formula - not to nitpick, but isn’t that exp. usually written as 2^n - 1 ?

  • source
  • parent
  • hideshow 3 child comments