New Game Source Code: Four in a Row

I've made a Connect Four AI. There is a text-only version and a graphical version made with Pygame. You will need Python 3 (not Python 2) to play the games (and Pygame for the graphical version.)

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

Source Code and image files zipped. (text version, doesn't need Pygame) (graphical version, needs image files)

Black token image, Red token image, Board image


  1. Neat. Next it would be cool to port an AI Mind like into Python.

  2. Very nice game, I’m planning to integrate it into a collection of educational games for children, ‘childsplay’ which is licensed under the GPL-3 license.
    Can I put chunks of your code under the GPL-3 License ?
    Of course I will send you upgraded images for the game as well as any improvements we perhaps make.

  3. I may be mistaken, but the text link seems to refer to a program that requires pygame.

  4. Thanks for pointing that out Will! I’ve fixed the link. It now goes to the text-based version of the game.

Post a comment.