The Invent with Python Blog

Writings from the author of Automate the Boring Stuff.

Fri 10 June 2011

New Game Source Code: Four in a Row

Posted by Al Sweigart in pygame   

I've made a Connect Four AI. You will need Python 3 (not Python 2) to play the games and Pygame.

In the graphical version, drag the red tokens over the top of the board to make a move.

Source Code and image files zipped.

Learn to program for free with my books for beginners:

Sign up for my "Automate the Boring Stuff with Python" online course with this discount link.