OpenGL based Connect four game

I had been longing to post this for a long time now. Recently, I built a connect four game for one of my class assignments at Carnegie Mellon. I was inspired to build this game by a Connect Four playing machine that I built as a team member  last semester for my Mechatronic Design Class in the Spring 2011 semester. You might be interested in the video below:

The OpenGL based game code may be downloaded from my git repository:

git@github.com:yamanoorsai/Connect-Four.git

The files needed for compiling the game is included in the repository.

It just needs to be compiled together. OpenGL needs to be installed before you compile the game.

When you launch the executable file, the console asks you the following question:

You may reply to the question with the letter y for Yes or n for No. The main game screen remains blank until this question is answered. The connect four game theme is to arrange coins of the same color vertically, horizontally or diagonally to win the game.

Once the question is answered, the game window appears as shown in the figure below:

You must use the main game screen to play the game. You may either key in the numbers 1-7 or use your mouse to click on the corresponding column on your screen.

Enjoy

Note: I borrowed the AI part of the code from Keith Pomakis

Advertisements

One Response to OpenGL based Connect four game

  1. […] at 6:17 pm and is filed under Uncategorized.You can follow any responses to this entry through the RSS 2.0 feed.You can leave a response, or trackback from your own […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: