Skip to content

A console program designed to allow two players to play a game of chess, complete with all features such as checkmate, castling, en passant, stalemate etc. ♟

License

Notifications You must be signed in to change notification settings

swiderskis/chess-improved

Repository files navigation

Chess Improved

game

About

A console program designed to allow two players to play a game of chess, complete with all features such as checkmate, castling, en passant, stalemate etc. ♟

It is designed to be a vast improvement on my earlier version of a chess program.

Playing the game

Players input their moves using algebraic notation. Castling is denoted using "O-O" or "O-O-O", rather than "0-0" or "0-0-0". Promotion is indicated using e.g. "e8=Q".

During their turn, players can also input various commands, including: "resign" to resign the game, "draw" to offer their opponent a draw, "save" to save the current moves played into a file called "PGN.txt", and "load" to load a saved game from "PGN.txt".

Unicode characters in Windows console

By default, the pieces are denoted in the console by their unicode characters. I'm not certain on how this works on Linux / Mac, but displaying these in a Windows console is... tedious. I managed to make this work on Windows 10 by enabling UTF-8 support, and installing a console font which contains symbols for the Unicode characters. This may differ for older versions of Windows or for other C++ compilers.

In the future, I plan on adding a config file which allows the unicode characters to be toggled off, and replaced with regular ASCII letters (e.g. 'K' for white king, 'k' for black king).

About

A console program designed to allow two players to play a game of chess, complete with all features such as checkmate, castling, en passant, stalemate etc. ♟

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages