Chess Program
- A full chess program
- Written in C
- Team of 7
- Source on GitHub
Description and Responsibility
This project's goal was to design and implement a complete chess program with an AI opponent in 5 weeks. My role in the project was to design and implement a UI for the game. My primary goal was to create a user interface that required as little modification of the main game in order to function properly.
Design Process
Initially, I opted to create a text interface to quickly produce a workable output for my fellow team members to utilize while working on their own parts of the project. Once I had completed this task, I moved on to creating a graphical user interface. I opted to utilize the SDL 1.2 as per the suggestion of our professor. After spending some time reading the documentation and experimenting with SDL, I proceeded to implement the new GUI.
To ensure the error checking and movement systems my teammates implemented were utilized, early on I designed the code to grab input information from the user and pass it to the core program.
After deciding on a design for the UI, I began by implementing the GUI by drawing the chess board itself and aligning the chess pieces. Next, I spent some time working with the event system in SDL to capture mouse clicks from the user. Once I could capture the mouse clicks, I moved onto adding the logic for highlighting the places on the chess board the player selects (along with checks for illegal clicks on the board).
Once these core features were completed, I replaced the text-based UI with the graphical one for testing. Once I confirmed it was working as intended, I moved onto creating the menus throughout the program for game setup.