One of my three electrical engineering electives for this final semester is ECE 463: Introduction to Computer Communication Networks. About two weeks ago, we were assigned a final project: Design a P2P Connect-Five game that communicates using the HTTP Protocol.
My partner, Jun Lin, and I quickly decided to use Python for the client-side GUI, since I had done a fair amount of GUI work in the course of my internship this past summer. We opted for Python 3 and used the Anaconda distribution. I did nearly all the Python GUI with the use of tkinter. Because the Spyder3 IDE was taking more time to adjust to than Spyder 2, I ended up relying on Bare Bones Software's BBEdit text editor--the power of which I am now beginning to appreciate--and Mac OS X Terminal. That was it!
Jun Lin worked some magic--the only word I can use, since I know nothing about PHP--for the server-side scripting. Initially we ran the server off my GoDaddy shared hosting account, but we found that it would block us after too many accesses from the same IP addresses. That forced us to turn to a different host, which we happened to have.
Anyway, we will demonstrate the game in class on Wednesday, but I wanted to put up some screenshots. I plan to make my Python GUI code available online at some point, because it would surely be helpful to others.
The following screenshot show the game at startup. We were required to have a 19x19 game board. I opted for check buttons, because they are easy to work with and make nice arrays.
The other screenshot shows a win. Every time black--you (peer is pink)--makes a valid move, my algorithms scan for a vertical, horizontal, SW–NE, or NW–SE win. If one is found, the peer is notified of their loss and scores are updated accordingly. If the peer logs out midway, that is correctly handled. We are rather proud of our game!