Last week Heap introduced a new, a slightly altered version of a tree, known as a BTNode with a specific design of having the children having to have conditions that would determine if it were to the right or left of the root node.
I'm still trying to get a feel for working with trees, but the coding in the BTNode is very similar in design so it shouldn't be too hard to navigate.
Assignment 2 is due in a week and with that being said there is a lot of stress looking at and taking a stab at the assignment itself. Designing the Tippy game itself took a bit of thinking to figure out but I decided to make the grid for the into a list of numbers so a grid 3x3 would just be a list of [1,2,3,4,5,6,7,8,9] and changing the value of the gives numbers to either an x or an o when a player applies a move to the gamestate. Figuring out the algorithm for a winning condition was just a bit of computation, and a general formula in terms of the grid size can be used to find win conditions.
No comments:
Post a Comment