Finally finished the entire TOAHModel module and managed to get the GUI version of the game working (how it works, though, is beyond me). Going back to my previous question about number_of_moves, I decided to resolve that problem by simply passing in an empty list when initializing MoveSequence. The first time I played the game, I noticed that it would allow you to stack a bigger cheese on a smaller cheese, which wasn't right; as it turns out, I forgot to raise an IllegalMoveError in the event of an illegal move, and once that was fixed, the game was 100% functional.
As for new developments...I've began work on ConsoleController and I'm sort of confident that everything is working as intended. The main thing that stumped me was user input--that is, in what form move commands were to be entered. Initially, I experimented with commas and lists (which really did not work out!) but found it too confusing and annoying to figure out, so I opted with just numbers separated by a space (something along the lines of 2 3, 4 1, 5 8....and so on) which was then split to create a list. Once that was out of the way, everything in ConsoleController fell into place: I quickly finished play_loop and by then, the only thing I really had left was Tour.py (which I still refrained from thinking about).
I haven't really been looking at others' SLOGs at this point, but from what I can see on Piazza, a lot of people have technical questions about A1 and not many are stuck with actual programming.
As a last note, I did some digging into this four-stool problem and found a Wikipedia page on the Tower of Hanoi (http://en.wikipedia.org/wiki/Tower_of_Hanoi). The four-stool variant is called Reve's puzzle, and unlike TOH, researchers are still working toward discovering an optimal solution to the number of steps. I just thought it was pretty interesting how Reve's solution included a portion of the TOH solution.
No comments:
Post a Comment