Programming a Connect-4 game on Python

Oscar Nieves
12 min readAug 10, 2021

Done from scratch using less than 200 lines of code.

The other day I was working with some Python and functions, and it occurred to me that it would be a fun task to program a Connect-4 game from scratch using a few functions and a data structure known as a stack. Programming board games is a fun activity for two reasons: (1) it teaches you how to think out of the box when it comes to coding and…

Oscar Nieves

I write stories about applied math, physics and engineering.