Go
View Screenshots

This is a PC replica of the famous and incredibly strategic Chinese board game Go. The rules to the game are very simple, but knowing the right move to make is not. More specific rules can be found at the wiki above, but here's my own very general summary of them:

There are two colors: white and black. Each player plays as one of the colors throughout the game, each taking a turn to place a piece on the board, not directly in the squares, but rather on one of their 4 corners. If any piece is surrounded by adjacent pieces of the opposite color, it is eaten (removed from the board), and the other player recieves a point. The most important way of gaining points is by obtaining territory, and this comes with closing in any area of the board with a single color. At the end of the game, a point is awarded to the player for each space he has within his territories. The player with the most final points wins.

The most complicated parts of designing this game are the algorithms for piece and territory capturing. In piece capturing, for example, placing the white piece in spot A below would kill the two black pieces.

In order to accomplish this, for example, I would recursively iterate through every black piece adjacent to the white one placed at A. For each of those black pieces, I check that no adjacent spaces are empty, because if so, then it means it is not fully surrounded. If all spaces are taken, then I recurse to the next closest black piece. I do this until I've checked all connected black pieces to that original white, and only remove them if they are not connected to empty spaces.

There are many special cases though, like corner captures. As of now, I've gotten capturing pieces to work almost flawlessly. The next step is to perhaps provide more of an interface, with point counting, and finally to distinguish territorial capturing, which will be the biggest challenge.

I've uploaded what I've done of the game up to now. I won't be working on it again for a while, since I'll be focusing on learning C#. Notable features include the Save button, which saves a readable txt file and a csv file used for Loading the game afterwards. The Awesome button is simply a fun little option that a friend suggested and I quickly implemented. Unfortunately, there's no way of ending the game, and so the program never recognizes when the game is finished. That'll be the first task once I return to the project.


Download Go.zip (683 KB)
Download Go.rar (628 KB)



Back