This repository contains a simple chess program written in C. The program is a command-line application that allows two players to play a game of chess against each other.
There are two primary methods for downloading and executing the program, both of which are outlined below:
For a quicker setup, the precompiled version of the game is available for downloading, saved as TurnBasedChessCompiled
. After downloading, it can simply be runned with the command:
./TurnBasedChessCompiled
The raw code can be downloaded and compiled following the next steps:
-
Download the raw source code:
The source code is available in the project files, saved asTurnBasedChess.c
. -
Compile the code:
The source code can be compiled by using any C compiler (e.g., GCC), by using the command:gcc -o TurnBasedChess TurnBasedChess.c
-
Run the code: Having the code already downloaded and compiled, it can simply be runned with the command:
./TurnBasedChessCompiled
The game has a main menu, with two submenus accessible through navigation from the main menu.
When you choose the option "Play Chess" in the main menu, some display like this should appear:
Here the user (black/white) needs to specify the piece that they want to be moved in the next format with the inputs separated with spaces:
- Piece (P/Q/K...)
- Letter representative of the column (a, b, c...)
- Number representative of the row (1, 2, 3...)
After the input has been completed (pressing the Enter key), another message should appear:
Here the user (black/white) needs to specify where they want to move the piece indicated in chess notation again separated by spaces:
- Letter representative of the column (a, b, c...)
- Number representative of the row (1, 2, 3...)
After the input has been completed (pressing the Enter key), the move should be finally performed and the match should begin.
Feel free to contribute by submitting issues or pull requests. Future improvements are welcome!
This project is open-source and licensed under the MIT License.