A Chess game built by Qt and C++.
The game can be played online by creating games in the lobby.The server will show all games in the lobby available for all clients.
Playing offline is available with two modes: 1: Play against another human player; 2: Play against a very SMART AI.
The AI uses the MiniMax algorithm.
Some idea and information from this tutorial
and https://github.com/subeshb1/Chess
AI's idea from https://github.com/lhartikk/simple-chess-ai
Click here to download and play HERE.
ALL code are in folder "Client" and "Server".
VS2017 compiles the server. Qt creator compiles the client(Game).
Winsock and windows.h are used to write the online part. Currently no Linux support is available. There will be a Linux version in the future.
cJSON is used to serialize messages like the move, create games, games list, etc.
A TCP connection is sent to make sure it can receive and send the message successfully.
Here is another GIF how this game is played online:
Here is an example of what happen when one side wins in one game:
I am not even its opponent!!!
The AI can play both of white side and black side:
It was a simple version and looks very stupid:
This program can also play as PVP:
Of course, it can do Promotion and Castling.
There are currently many server-side bugs. Sometimes the messages will not be sent to clients.
There is a bug in AI when the AI only has two possible turns left.
Currently there a bugs in the code, I will be very appreciated if you can help me find the bugs! In addition, if you have any ideas which can help improve this game, please let me know!