A simple chess game made in C++ for a univesity exam.
final result: 10/10
- 2 play mode
- Computer vs Computer
- Player vs Computer
- all special moves have been added
- en-passant
- castling
- possibility to ask for surrender
- replay mode, every match have been saved in .txt file. Two replay mode:
- Put replay in file .txt with all chessboard changes.
- Step by Step view with replay program
white pieces are lower case, black pieces are upper case
List of pieces (the letters are taken from the names of standard Italian pieces):
- A: Bishop
- D: Queen
- R: King
- T: Rook
- C: Knight
- P: Pawn
Note: CMake is required!
after installation, open folder in shell and write :
$ cmake . ##you need root privilege
after which, some new files are created in the folder. Now it is necessary to create the dependencies:
$ cmake --build . ##you need root privilege
First of all, you need to execute the chessboard with the desired mode:
if you choose CC:
- you need to select the maximum round
if you choose PC:
- you need to chose your player name
How to read a move:
what is F2 or F4?
this is the layout of our virtual chessboard:
Note: white pieces are lower case, black pieces are upper case
- the numbers [1,8] are the rows
- the letters [A,H] are the colums
A square coordinates composition is {letter}{number}
A move is composition of 2 coordinates start_position end_position
When it's your turn, monitor display this message (Rick is my nick 😉):
what you can do?
- DRAW: you can request a draw and bot decide if accept o decline
- XXXX: print the current status of virtual chessboard
- Insert a Move: make your next move in form $start_postion $end_position
There are 2 mode of view a match replay
- Put replay in file .txt with all chessboard changes
- Step by Step view with replay program