Checkers Game

Introduction

In ICS111, I, along with my partner Grace Jung, created a game of checkers with help from EZ, provided to us. Our game follows the rules of Checkers to the letter, and is playable with 2 players only. Players move pieces by clicking a piece with the mouse, and then clicking an empty space that the piece can go to, taking turns until the game is over. This project helped me learn how to collaborate in a development environment, the basics of programming in Java, and how to design, develop, and debug games. Our project was selected as one of the best projects out of our ICS111 class.

Responsibilities

My responsibility was primarily the game logic (regarding the valid movement of pieces, capturing logic, etc.) and debugging the code. It was particularly challenging to debug, as there were many fringe case bugs caused by incorrect logic.

Our algorithm mostly involved using a 2d array to hold the pieces, and checking each piece’s valid moves by comparing its position to other pieces’ positions on the board, and making sure the pieces could not exit the boundaries of the checkers board. This approach ended up having a lot of specific cases for few specific scenarios, which most likely means the algorithm could have been improved; as it stands, there was most likely a lot of spaghetti code in the program. Nevertheless, we managed to get the game working and debugged it as best we could, but there were possibly some other fringe cases that we did not encounter in our testing.

Reflections

I think it’s possible that we could’ve developed a better algorithm for our board logic rather than having to run checks on each piece to see what valid squares it could move to, possibly something that could cut down on the fringe case bugs and have been more simpler to implement. I also would’ve liked to have had some more features, particularly displaying possible moves on the board, or an AI opponent. Overall, I learned a lot about game development, programming in Java, and collaboration with teammates on a software development project.

Github

Dropbox (May need Eclipse to run)

Youtube Demo: