Conquer Chess
Chess and Starcraft combined
Loading...
Searching...
No Matches
Functions
fen_string.cpp File Reference
#include "fen_string.h"
#include "pieces.h"
#include <cassert>
#include <regex>
Include dependency graph for fen_string.cpp:

Functions

fen_string create_fen_string_of_standard_starting_position (const chess_color active_player)
 Create the FEN string of the standard starting position.
 
fen_string create_fen_string_with_starting_position (const starting_position_type t, const chess_color active_player)
 
chess_color get_color (const fen_string &s)
 Extract the color from a FEN string.
 
fen_string get_fen_string_game_over_white_no_king () noexcept
 Get a FEN string for a game that is over: white has no king anymore.
 
fen_string get_fen_string_game_over_black_no_king () noexcept
 Get a FEN string for a game that is over: black has no king anymore.
 
fen_string get_fen_string_game_over_white_checkmate () noexcept
 Get a FEN string for a game that is over: white is in checkmate.
 
fen_string get_fen_string_game_over_black_checkmate () noexcept
 Get a FEN string for a game that is over: black is in checkmate.
 
fen_string get_fen_string_wikipedia_0 () noexcept
 Get an example FEN string from Wikipedia.
 
fen_string get_fen_string_wikipedia_1 () noexcept
 Get an example FEN string from Wikipedia.
 
fen_string get_fen_string_wikipedia_2 () noexcept
 Get an example FEN string from Wikipedia.
 
fen_string get_fen_string_wikipedia_3 () noexcept
 
void test_fen_string ()
 
bool operator== (const fen_string &lhs, const fen_string &rhs) noexcept
 

Function Documentation

◆ create_fen_string_of_standard_starting_position()

fen_string create_fen_string_of_standard_starting_position ( const chess_color  active_player = chess_color::white)

Create the FEN string of the standard starting position.

The active player can be changed to black. This would be equal to say that black starts.

◆ create_fen_string_with_starting_position()

fen_string create_fen_string_with_starting_position ( const starting_position_type  t,
const chess_color  active_player 
)

◆ get_color()

chess_color get_color ( const fen_string s)

Extract the color from a FEN string.

◆ get_fen_string_game_over_black_checkmate()

fen_string get_fen_string_game_over_black_checkmate ( )
noexcept

Get a FEN string for a game that is over: black is in checkmate.

◆ get_fen_string_game_over_black_no_king()

fen_string get_fen_string_game_over_black_no_king ( )
noexcept

Get a FEN string for a game that is over: black has no king anymore.

◆ get_fen_string_game_over_white_checkmate()

fen_string get_fen_string_game_over_white_checkmate ( )
noexcept

Get a FEN string for a game that is over: white is in checkmate.

◆ get_fen_string_game_over_white_no_king()

fen_string get_fen_string_game_over_white_no_king ( )
noexcept

Get a FEN string for a game that is over: white has no king anymore.

◆ get_fen_string_wikipedia_0()

fen_string get_fen_string_wikipedia_0 ( )
noexcept

Get an example FEN string from Wikipedia.

It is the starting position.

From \url{https://en.wikipedia.org/wiki/Forsyth%E2%80%93Edwards_Notation#Examples}

◆ get_fen_string_wikipedia_1()

fen_string get_fen_string_wikipedia_1 ( )
noexcept

Get an example FEN string from Wikipedia.

It is the position after e4.

From \url{https://en.wikipedia.org/wiki/Forsyth%E2%80%93Edwards_Notation#Examples}

◆ get_fen_string_wikipedia_2()

fen_string get_fen_string_wikipedia_2 ( )
noexcept

Get an example FEN string from Wikipedia.

It is the position after 1. e4. c5

From \url{https://en.wikipedia.org/wiki/Forsyth%E2%80%93Edwards_Notation#Examples}

◆ get_fen_string_wikipedia_3()

fen_string get_fen_string_wikipedia_3 ( )
noexcept

◆ operator==()

bool operator== ( const fen_string lhs,
const fen_string rhs 
)
noexcept

◆ test_fen_string()

void test_fen_string ( )