Skip to content

Commit

Permalink
Add descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
m-heim committed Feb 8, 2024
1 parent f9e4d94 commit d8dbf00
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/position/fen.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@
#include "magic.hpp"
#include "position.hpp"

/**
* @brief Parse a FEN string
* @exception May fail if FEN invalid!
* @param fen Reference to FEN string
* @return Position that equals input FEN string
*/
Position parseFen(const std::string &fen);

/**
* @brief Read a FEN from a file
*
* @param fenPath The path to the file containing FEN string
* @return std::string the FEN string read from the file
*/
std::string readFen(const std::string &fenPath);
6 changes: 6 additions & 0 deletions src/position/util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@

#include <string>

/**
* @brief Raise a critical error and exit
*
* @param message The message to display to stdout
* @param exit_code Exit code, usually 1 or 2
*/
void fce_error(const std::string &message, int exit_code);

0 comments on commit d8dbf00

Please sign in to comment.