Session 19

PP 26, 27

These exercises were the second and third in the “tic-tac-toe” series; by the end of the third, I had a complete working game! This was actually not too challenging. The secret was keeping the data flow between the various functions organized. Related to that, I’m still trying to learn how best to name variables. I want to keep the names short for ease of use, but then they tend to be less descriptive. Also, I’m still learning when it’s OK (if ever) to reuse variable names inside and outside of functions. I think I will probably learn this via experience (especially when I start to write longer, more complex programs).

Below, I have just included the code from the draw_board() function, as the complete code was pretty long to post here; but if anyone is interested in it, I can post it below in the comments!