Getting Started

Prerequisites

To use chesscxx, you’ll need:

  • C++23 compatible compiler (see the Overview for a list of supported compilers)

  • CMake 3.28+ and a compatible generator (e.g., Ninja, Make, or Visual Studio) — only required if you want to build or install chesscxx with CMake or use it via FetchContent.

Installation

chesscxx is a header-only library, meaning no compilation or linking is required. To use it in your project, simply add the include directory to your compiler’s include path.

For example:

git clone https://github.com/igorqs/chesscxx.git
g++ -I chesscxx/include your_program.cpp -o your_program -std=c++23

Building with CMake

If you prefer, you can build and install chesscxx using CMake. This allows you to install the headers system-wide (e.g., into /usr/local/include/chesscxx-<version>/).

Build

For single-configuration generators (like Unix Makefiles):

cmake -S . -B build -D CMAKE_BUILD_TYPE=Release
cmake --build build

For multi-configuration generators (like Visual Studio):

cmake -S . -B build
cmake --build build --config Release

Install

After building, install the headers:

For single-configuration generators:

cmake --install build

For multi-configuration generators:

cmake --install build --config Release

CMake package

Once installed, other CMake projects (targets) can depend on chesscxx by using the find_package command of CMake:

  • Package name: chesscxx

  • Target name: chesscxx::chesscxx

Example usage:

find_package(chesscxx REQUIRED)
# Declare the imported target as a build requirement using PRIVATE, where
# project_target is a target created in the consuming project
target_link_libraries(
    project_target PRIVATE
    chesscxx::chesscxx
)

Using with FetchContent

If you prefer not to install chesscxx system-wide, you can use CMake’s FetchContent module to fetch the library directly from its repository at configure time:

include(FetchContent)
FetchContent_Declare(
    chesscxx
    GIT_REPOSITORY https://github.com/igorqs/chesscxx.git
    GIT_TAG main   # <-- or a specific commit/tag for stability
)
FetchContent_MakeAvailable(chesscxx)

target_link_libraries(
    project_target PRIVATE
    chesscxx::chesscxx
)

Examples

Full Game

#include <chesscxx/game.h>
#include <chesscxx/parse.h>
#include <chesscxx/san_move.h>
#include <chesscxx/uci_move.h>

#include <cstdlib>
#include <print>
#include <string_view>

namespace {
void verify(const auto& check) {
  if (!static_cast<bool>(check)) std::abort();
}
auto parseSanMove(std::string_view str) -> chesscxx::SanMove {
  auto parsed_san_move = chesscxx::parse<chesscxx::SanMove>(str);
  verify(parsed_san_move);
  return parsed_san_move.value();
}

auto parseUciMove(std::string_view str) -> chesscxx::UciMove {
  auto parsed_uci_move = chesscxx::parse<chesscxx::UciMove>(str);
  verify(parsed_uci_move);
  return parsed_uci_move.value();
}
}  // namespace

auto main() -> int {
  chesscxx::Game game;

  verify(game.move(parseSanMove("e4")));
  verify(game.move(parseUciMove("g7g5")));
  verify(game.move(parseSanMove("Nc3")));
  verify(game.move(parseSanMove("f5")));
  verify(game.move(parseSanMove("Qh5")));

  std::println("{}", game);
}

Output:

[Result "1-0"]

1. e4 g5 2. Nc3 f5 3. Qh5# 1-0

Using the Move Generator

#include <chesscxx/game.h>
#include <chesscxx/movegen.h>
#include <chesscxx/parse.h>

#include <cstdlib>
#include <print>
#include <string_view>

namespace {
void verify(const auto& check) {
  if (!static_cast<bool>(check)) std::abort();
}
auto parseFen(std::string_view str) -> chesscxx::Game {
  auto parsed_game =
      chesscxx::parse<chesscxx::Game>(str, chesscxx::parse_as::Fen{});
  verify(parsed_game);

  return parsed_game.value();
}

void printGame(const auto& game) {
  std::println("{:fen}", game);
  std::println("{}", chesscxx::legalUciMoves(game));
  std::println("{}\n", chesscxx::legalSanMoves(game));
}
}  // namespace

auto main() -> int {
  chesscxx::Game const game =
      parseFen("3r1bnr/kPpppppp/2R5/8/8/8/1PPPPPPP/1NBQKBNR w K - 1 9");

  printGame(game);
}

Output:

3r1bnr/kPpppppp/2R5/8/8/8/1PPPPPPP/1NBQKBNR w K - 1 9
[g1h3, g1f3, b1c3, b1a3, c6c5, c6c4, c6c3, c6c7, c6b6, c6a6, c6d6, c6e6, c6f6, c6g6, c6h6, h2h3, h2h4, g2g3, g2g4, f2f3, f2f4, e2e3, e2e4, d2d3, d2d4, c2c3, c2c4, b2b3, b2b4, b7b8n, b7b8b, b7b8r, b7b8q]
[Nh3, Nf3, Nc3, Na3, Rc5, Rc4, Rc3, Rxc7, Rb6, Ra6+, Rd6, Re6, Rf6, Rg6, Rh6, h3, h4, g3, g4, f3, f4, e3, e4, d3, d4, c3, c4, b3, b4, b8=N, b8=B+, b8=R, b8=Q+]

Parsing PGN

#include <chesscxx/game.h>
#include <chesscxx/parse.h>

#include <print>

auto main() -> int {
  auto parsed_game = chesscxx::parse<chesscxx::Game>(
      "[FEN \"7k/8/6KN/8/7B/8/8/8 w - - 0 1\"]\n"
      "\n"
      "1. Bf6#");

  if (parsed_game) {
    std::println("{}", parsed_game.value());
  } else {
    std::println("{}", parsed_game.error());
  }
}

Output:

[Result "1-0"]
[FEN "7k/8/6KN/8/7B/8/8/8 w - - 0 1"]
[SetUp "1"]

1. Bf6# 1-0

Parsing games from a file

#include <chesscxx/game.h>
#include <chesscxx/parse.h>

#include <algorithm>
#include <cctype>
#include <fstream>
#include <iostream>
#include <iterator>
#include <print>
#include <ranges>
#include <string_view>
#include <vector>

auto main() -> int {
  std::ifstream file("data/games.pgn", std::ios::binary);
  if (!file) return 1;

  std::vector<char> buffer{std::istreambuf_iterator<char>{file},
                           std::istreambuf_iterator<char>{}};

  // trim trailing spaces; otherwise, these spaces might be parsed as a valid
  // empty game
  auto rit = std::ranges::find_if_not(
      std::ranges::reverse_view(buffer),
      [](unsigned char character) { return std::isspace(character); });

  std::string_view const str(buffer.begin(), rit.base());

  for (const auto *it = str.begin(); it != str.end();) {
    auto result = chesscxx::parseFrom<chesscxx::Game>(it, str.end());
    if (result) {
      std::println("{}", result->parsed_value);
    } else {
      std::println(stderr, "{}", result.error());
      return 1;
    }
    it = result->ptr;
  }

  return 0;
}
[Result "*"]

1. e4 Nf6 2. e5 Nd5 3. d4 d6 4. c4 Nb6 5. exd6 cxd6 6. Nf3 *
[Result "0-1"]

1. e4 Nf6 2. e5 Nd5 3. d4 d6 4. c4 Nb6 5. exd6 cxd6 6. Nf3 g6 7. Nc3 Bg7 8. Be2 O-O 9. h3 Bf5 10. Nh4 Bd7 11. Bg5 Nc6 12. Nf3 Bf5 13. a3 Qc8 14. d5 Ne5 15. Bxe7 Nxf3+ 16. gxf3 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Qb3 Bxc3+ 20. Kf1 Bxh3+ 21. Rxh3 Qxh3+ 22. Kg1 Be5 23. Bxe5 Rxe5 24. Qxb2 Rg5 0-1

1. b3 { A01 Nimzo-Larsen Attack } Nc6 2. Bb2 b6 3. e3 Bb7 4. Nf3 Nf6 5. d4 d5 6. Nbd2 e6 7. Be2 Bd6 8. O-O h5?! { Inaccuracy. O-O was best. } (8... O-O 9. c4) 9. Ne5 h4 10. Bb5 Bxe5 11. dxe5 Nd7 12. f4 Qe7?! { Inaccuracy. h3 was best. } (12... h3) 13. Bxc6 Bxc6 14. Bd4? { Mistake. h3 was best. } (14. h3) 14... O-O-O?! { Inaccuracy. h3 was best. } (14... h3) 15. a4 g5 16. a5 b5?! { Inaccuracy. Bb7 was best. } (16... Bb7) 17. Bxa7 Rdg8? { Mistake. gxf4 was best. } (17... gxf4) 18. Bd4 gxf4 19. exf4 Rg7 20. a6 Rhg8 21. Rf2 Nb6?! { Inaccuracy. Ba8 was best. } (21... Ba8) 22. a7?! { Inaccuracy. Nf3 was best. } (22. Nf3 Nd7 23. Qd2 Ba8 24. b4 f6 25. exf6 Nxf6 26. Bxf6 Qxf6 27. Qd4 Rf7) 22... Ba8?! { Inaccuracy. Kb7 was best. } (22... Kb7 23. Nf3 Ka8 24. c3 Bb7 25. b4 Qe8 26. Qf1 Nc4 27. Qe2 Qc6 28. Ng5) 23. Qe2 Rg4 24. Qxb5 { Black resigns. } 1-0

1. d4 Nf6 2. Nf3 d5 3. Nbd2 c5 4. e3 Nc6 5. c3 cxd4 6. exd4 Bf5 7. Qb3 Qc7 8. Nh4 Bg4 9. Bd3 e5 10. h3 Be6 11. dxe5 Qxe5+ 12. Kd1 O-O-O 13. Nhf3 Qh5 14. Re1 Ne4 15. Re2 Bc5 16. Kc2 Nxf2 17. Qb5 Nxd3 18. Rxe6 fxe6 19. Qxd3 Qf5 20. Qxf5 exf5 21. Nb3 Bb6 22. Bg5 Rd7 23. a4 h6 24. Bd2 Na5 25. Nbd4 B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