Skip to content

xbandrade/fairy-chess

Repository files navigation

🪄 Fairy Chess ♟️

A C++ implementation of the Fairy Chess game

❕Fairy Chess is a type of chess variant that modifies some rules, pieces and/or the board of traditional chess.

➡️ Setup

❕Unix systems

./build.sh to build the application with CMake and run fairy-chess

❕Windows systems

./build.bat to build the application with CMake and run fairy-chess.exe
./run.bat to run the application after compiling

❕Main Menu Options

  • Player vs Player will start a match between two players
  • Player vs Bot will start a match against the bot. The bot currently uses one of its legal moves randomly
  • Help will display information about the fairy pieces, the rules of the game and how to play it
     

❕This implementation of Fairy Chess currently has three Fairy Pieces:

  • The Wazir has the same movement pattern as the Rook, but can only move a single square, making it very weak. Its symbol in algebraic notation is W and it is worth as much as a Pawn.

  • The Camel moves 3 squares forward and one to the side, in a long L shape. It can also jump over other pieces, just like the Knight. Its symbol in algebraic notation is C and it is worth as much as a Knight.

  • The Grasshopper has the same movement pattern as the Queen, but can only move by hopping over another piece, then it lands immediately behind that piece. If there is no pieces to hop over, the Grasshopper cannot move! Its symbol in algebraic notation is G and it is worth as much as a Knight.

  • All the other pieces have their traditional movement pattern and exchange value. The board and other chess rules remain unchanged.

     

❕Moves

➡️ You can move a piece by using its algebraic notation:

  • Qe5 moves the Queen to e5
  • Gxd4 moves the Grasshopper to d4, capturing a piece
  • h3 moves a Pawn to h3
  • dxe4 moves a Pawn in the d file to e4, capturing a piece

➡️ Special moves:

  • m + [algebraic position] will display all legal moves for the piece on that position, e.g. the Wazir is on square b6, then mb6 shows all available moves for that Wazir.
  • m* will display all legal moves for the current player
  • M1B will take you to a mate in 1 position for the black pieces, can only use it on the first move
  • M1W will take you to a mate in 1 position for the white pieces, can only use it on the first move
  • quit during a match will forfeit the game and go to the main menu

More information about Fairy Chess pieces and rules can be found on chess.com and Wikipedia.

About

Fairy Chess game implemented in C++

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages