Day 66

Being that today is Wednesday, I have to finish up my last two stories before my IPM tomorrow. Thankfully I was almost done with the videos and had nearly a full day to focus on my TicTacToe clean up story.

I watched one video at the beginning and end of the day to wrap that story up. Needless to say watching that many videos in one week was a lot of information to take in. I may come back to some of these videos to make sure all the concepts stuck.

The rest of the day I spent finishing up my clean-up story as I previously mentioned. Like my HTTP_Server story, I had to refactor to allow the use of high level functions. My ttt-web application is a ui type for my application, I have to extend the behavior of the ui within my ttt API. Fortunately my TicTacToe was already mostly capable of this!

I had to account for two new things. The first was that unlike my other UI implementations, the web ui can’t maintain a persistent conversation with my TTT implementation. This is because the web ui has to make a new connection via POST everytime I want to update information. To accommodate this extracted each round of the game from the game-loop function I have. By doing this I can run a single round individually without it looping until the game is over. The second refactoring I focused on was allowed the play-turn function to return different things depending on the UIs context. I did this because the web-ui is expecting html content, while the other UIs are expecting a game state after a turn is played.

Finishing up my changes, I put some implementations into my ttt-web server to further demonstrate the work I did this week. I feel fully ready for my IPM tomorrow!