DEV Community

Cover image for Connect Four Project Python
twiin0
twiin0

Posted on

Connect Four Project Python

Had to make a Python project for a course so I made Connect Four, it was a fun challenge as I haven't really made that many programs without training wheels before.

Program in action

The whole game sits within a Class "ConnectFour".
There are functions to do all of the required tasks to make the game work, for example the "print_board" and "index_to_checker" functions that print the Connect Four board by indexing through the board 2d array and converting every value into the required ascii character (0 to ' ', 1 to 'X', 2 to 'O') and printing to screen using an f string.

Link to github repository

In conclusion, I got a lot of enjoyment out of making this project and am looking forward to creating more challenging projects in the future! :)

Top comments (0)