# Hanoi Tower game

**URL:** <https://forum.makecode.com/t/hanoi-tower-game/6403>\
**Category:** micro:bit\
**Created:** [February 26, 2021, 5:25pm UTC](https://forum.makecode.com/t/hanoi-tower-game/6403 "2021-02-26T17:25:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SiniBali](https://avatars.discourse-cdn.com/v4/letter/s/3bc359/32.png) [@SiniBali](https://forum.makecode.com/u/SiniBali)\
**Post date:** [February 26, 2021, 5:25pm UTC](https://forum.makecode.com/t/hanoi-tower-game/6403/1 "2021-02-26T17:25:59Z")

</div>

> **[Hanoi Tower](https://makecode.microbit.org/16623-82078-07544-89671)**
>
> Microsoft MakeCode for micro:bit földjén készült sok ❤️-tel.

---

<div class="post-metadata">

**Author:** ![SiniBali](https://avatars.discourse-cdn.com/v4/letter/s/3bc359/32.png) [@SiniBali](https://forum.makecode.com/u/SiniBali)\
**Post date:** [February 26, 2021, 7:51pm UTC](https://forum.makecode.com/t/hanoi-tower-game/6403/2 "2021-02-26T19:51:41Z")

</div>

> **[Tower of Hanoi](https://en.wikipedia.org/wiki/Tower_of_Hanoi)**
>
> The Tower of Hanoi (also called the Tower of Brahma or Lucas' Tower and sometimes pluralized as Towers) is a mathematical game or puzzle. It consists of three rods and a number of disks of different sizes, which can slide onto any rod. The puzzle starts with the disks in a neat stack in ascending order of size on one rod, the smallest at the top, thus making a conical shape.
> The objective of the puzzle is to move the entire stack to last rod, obeying the following simple rules:
> With 3 disks, th...

---

<div class="post-metadata">

**Author:** ![SiniBali](https://avatars.discourse-cdn.com/v4/letter/s/3bc359/32.png) [@SiniBali](https://forum.makecode.com/u/SiniBali)\
**Post date:** [February 26, 2021, 8:10pm UTC](https://forum.makecode.com/t/hanoi-tower-game/6403/3 "2021-02-26T20:10:04Z")

</div>

How to play:

1. Select level (number of discs): 2-5 (A decrease, B increase, A+B select)
2. There are 3 screens, you can switch with A and B between them (low lighted LEDs marked the number of the actual screen)
3. A+B: pick up a disc or put it down if it is already picked
4. You can put down a disc to an empty place or onto a bigger disc (but onto a smaller disc is not alowed)
5. Target is to replace all of discs to another place

---

<div class="post-metadata">

**Author:** ![SiniBali](https://avatars.discourse-cdn.com/v4/letter/s/3bc359/32.png) [@SiniBali](https://forum.makecode.com/u/SiniBali)\
**Post date:** [February 26, 2021, 8:44pm UTC](https://forum.makecode.com/t/hanoi-tower-game/6403/4 "2021-02-26T20:44:01Z")

</div>

minimal steps for solution:

- 2nd level: 3
- 3rd level: 7
- 4th level: 15
- 5th level: 31
