Captain's Mistress is an old name for the game which Hasbro calls Connect 4™. You may call it whatever you want, but I don't want to get into a squabble with trademarks. This relatively simple two-person game challenges the players to choose a disk color and alternate putting their disks into the frame. The first person who puts four in a row of the same color wins. The row may be vertical, horizontal or diagonal. (Yes, I know the photo shows both players have won. I was going for a pretty pattern for the picture.
Examine the code at your leisure. There are no very fancy tricks involved. The only (probably obvious) recommendation is that you need to use three colors. The frame is one color; each set of disks is a different color which will contrast with each other and the frame. There are four extra disks of each color in case some get lost in use.
SCAD files for study/modification and STL files for quick printsframe-and-stand02.scad - frame-and-stand02.stl
disks.scad - disks.stl