Yay! Programmer art!
Yay! Programmer art!

In A Row Activity in Development for the XO (fancy Tic Tac Toe)

Earlier this month I decided to write my first activity for the OLPC XO laptop since I believe the best way to learn is by doing. Since I have a background in computer games I choose to make a simple game. I decided to write the ever-popular-with-kids game Tic Tac Toe. My primary thought was that if the computer could play Tic Tac Toe then I wouldn’t have to.

As it turns out, writing a Tic Tac Toe game is about as boring as playing one but since I’d already written code to create a grid, draw Xs and Os, and come up with a plan for a grid based computer AI, I decided that instead of dropping the activity all together I’d alter it to allow larger grids and more tokens in a row to win. This would allow playing games like Go-moku which I remember playing against the computer when I was in high school. That was the birth of the In A Row Activity.

The activity is based on the OLPCGames wrapper for pygame which is already installed on the XO. I highly recommend using it if you plan to write a game activity.

In any case, click here to download the In A Row Activity and try it for yourself. You can take a look at a screenshot here. Let me know what you think or if you find any problems.

In A Row Activity screenshot

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*

For spam detection purposes, please copy the number 1275 + 1 to the field below: