Studio Micah


Day 4

We were given the task of building a tic tac toe game, which is simple right? Just slapping X's and O's in some little squares, that's easy. NOPE. For example, there has to be a winner. How does the game know when there is a winner? How does it know whether an X or an O won? Those two questions kept me up pretty late last night, but after asking questions, talking out the problem, and trying different solutions, I ended up with this block of code that runs each time a space is tapped.

It might not be the prettiest method in the world, and I'm sure there are much cleaner and more efficient ways to do this, but it works. We have the weekend to finish it, so I'm just getting started. I may realize a better way to take care of this.

I'm still working on the functionality of the game, so I haven't touched anything relating to visuals yet. I'm finding that very hard to do. If I get stumped on a problem, I want to go over to the storyboard and start working on the appearance of the app. I find that I end up spending too much time designing that I might never come back over to the code and work on the problem. So, I'm trying to hold myself to making it work well first, then focus on implementing the design. 

Micah Lanier3 Comments