Chess-engine designed and implemented by my friends, Cogo and Patrick, and I. Features AI opponent (using minimax), Lichess integration and multiplayer-on-LAN.
The program has several different gamemodes and playmodes.
A gamemode is defined by a change in the rules and/or the starting position of the board. Technically, a gamemode is implemented by deriving from Gamemode
-class, where custom logic can be implemented by overriding the virtual methods, StartTurn
, UpdateGameState
, ValidateMove
. Currently, no gamemodes make use of overriding the methods.
This is the normal gamemode of chess. All normal rules apply.
There are a couple rules that still need to be implemented, 'Threefold repetition' (#13), '50-move rule' (#17) and forced draw in dead positions (#18).
Horde plays the same way as regular chess, but white plays only as pawns.
Tiny isn't an official gamemode, but a gamemode made to test the bot in positions with fewer moves, but still realistic situations. The queen and one bishop has been removed to make room on a 6x8 board.
The remaining available gamemodes are used for testing, and aren't really playable.
This gamemode is used to test the many different movement patterns the pawns make use of.
Playmodes are the ways to play a gamemode, locally, remotely or maybe with a bot. Technically, a playmode is defined by a class inheriting from Player
. The only method that is virtual on this class is TurnStarted
which expects the class to call Chessboard for the game to continue.
This is the most basic way to play. It works by both players selecting 'local', and then they both make moves by selecting a piece with the UI. The boards rotation is currently fixed, (maybe the board is going to flip every move in the future when #11 has been resolved).
To play remotely, each person has to open an instance of the software. Then select 'local' as the team they want to play as, and select the 'remote' option of the other team. Furthermore, selecting the 'remote' option unlocks the IP field.
Both players need to enter the IP of the host. The host is always the one who plays as black, in this case, player 1. Here the player on team black has the local IP 192.168.2.214
.
The host (player 1 / black) needs to press 'Start match' first, then the UI is going to freeze and wait for someone to connect (this is because the server interrups the UI loop (#20)).
Player 1 setup:
Player 2 setup:
In case you have trouble starting a match, please create an issue.
Starting a match with a bot, summons a unique window, which shows the calculation process and allows you to change the search depth.
To play against bot, just select 'local' for yourself, and 'bot' as the opponent.
To watch two bots fight it off, just select 'bot' as both white and black.
Doing so will spawn two bot windows instead of one. The title of each window shows which team it's representing.
(Try to remember how the Lichess player-class works and make a good description here)
(insert image of setup, both Lichess and ChessForms UI)