Tuesday, April 17, 2018

T of Hanoi

Hoping to code the Tower of Hanoi with HTML5. Turns out thatt
the event target is the event source element...



Math is fun offers a version of the game where one can add rings!

https://www.mathsisfun.com/games/towerofhanoi.html

                                    *     *     *

I think I may have solved the action coding. The table below gives the acceptable values
for id plus children count, in any situation.


Game can be played if the user sets up.



https://plnkr.co/edit/yC7h9NZvuOIpa5n4EJOw?p=preview

                                           *     *     *

Finally, a breakthrough on layout. My orange divs are positioned in a row from the flex
container, but their respective ids lets me give them a fixed margin-left(with respect to
the browser window.


                            
                                          *     *     *

The home version of the game: it does not scale, but can be played reliably
on my home computer.



No comments: