Thursday, 20 February 2014

Tower of Anne Hoy, Complete!

   The solution for the Tower of Anne Hoy took me forever to figure out. In the end, I never solved the fastest solution, but I solved it! It required a hard coding of moving the first 4 cheeses to the second stools, then doing a regular 3 cheese Tower of Hanoi solution with the remaining stools.
   
    Once complete, the solution would hard code the unpacking of the other 4. That was the fastest, and most seamless way to complete the game without any hiccups. This was also the first time I used a a timed animator to complete an auto-running code. It seemed satisfying, and all-around complete. Just completing the assignment all by myself was a big boost for my confidence in computer programming.

    The next thing we learned about in class was turtles. Turtles are a recursive way to draw lines, and like all objects, Turtles have methods. Although I went to class, I spent majority of it debugging my code, therefore my knowledge of Turtles are quite limited. However, I do know that Turtles allow for changing of colour, changing of length, and other various attributes that you would expect from a line/ graphical interface. Well  I better learn it fast, considering my upcoming midterm!

No comments:

Post a Comment