Connect4-CLI

Posted on January 18, 2014

GitHub repository

A sequel to this and this.

I like terminals. I like colors in terminals. I also like intuitive and good looking command line applications (colors make it more pleasant for the eyes too). I knew from the start that the Windows command line doesn’t explicitly support colors. That’s why I used UniCurses for cross-platform functionality. Coupled with docopt, the resulting CLI is completely cross-platform and looks kewl.

So I wrote a connect 4 game. Given my fascination with game networking, it’s played online through TCP.

Here it is running on localhost (both server and client):

Usage:  
 connect4.py server <address> <port>  
 connect4.py client <address> <port>  
 connect4.py (-h | –help)

Examples:  
 connect4.py server 127.0.0.1 6666  
 connect4.py client 127.0.0.1 6666

Options:  
 -h, –help