c Archive

C Programming: Tic-Tac-Toe Simulator - Part 4

The fourth and final video in the series. I add the ability to ask for a number of games on the command line, do some final cleanup of the code and testing, and push it all to my gitlab repository.

I intend to do more programming videos, so if you have suggestions or questions, please send them to aaron@baugher.biz. I may try some live streaming so it would be possible to interact in more of a classroom manner, if these generate any interest in that.

C Programming: Tic-Tac-Toe Simulator - Part 3

This is the one where I spend an embarrassing amount of time figuring out how exactly to avoid losing a game of tic-tac-toe. Got it figured out, though. Now the players are smart enough to force a tie every time. In Part 4 I’ll clean up the code somewhat, add a few more features, and maybe talk about what comes next in the series.

C Programming: Tic-Tac-Toe Simulator - Part 2

Here in part 2 I write most of the code, getting the program to where it can simulate one game. The AI is very dumb at this point, on purpose, so I could make sure the win and block conditions worked correctly. Part 3 will make it smart enough to produce all tie games, clean up the code, and do any debugging.

This isn’t a tutorial, so I’m not trying to teach C in it, though that’s something I may tackle at another time. It’s mainly a programming demonstration, to give those who might be interested in programming, or who have experience in other languages and have an interest in C, a chance to see what it’s like.

If you have any comments or questions, please comment at the video hosting site. I’d be glad to read and respond to them. Also, my apologies for the microphone crashing in the middle of it.

C Programming: Tic-Tac-Toe Simulator - Part 1

This the first part in a series of videos on C programming, which will walk the viewer through programming a tic-tac-toe simulator (a program which has the computer play against itself, a la War Games). I will be making it up as I go along, so you’ll get to see how the sausage is made, from designing to debugging. I hope that doesn’t result in too many long pauses as I think about things, or too many times of backing up and starting over, but we’ll see.

This part 1 just goes over some of the tools I use, and how to set up a project in the first place, including the creation of a git and GitLab repository so the project can be shared with others, who can then offer patches or fork it for their own use. Actual design and coding of the program will be coming soon in part 2.