aboutsummaryrefslogtreecommitdiff
path: root/src/pgnp.hpp
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2022-01-24 18:32:05 +0100
committerLoic Guegan <manzerbredes@mailbox.org>2022-01-24 18:32:05 +0100
commit5d4a7d66cba27b946ac155983d8b1710b353aaae (patch)
tree59fabec41c90c061695f6f8925cfdef470053d47 /src/pgnp.hpp
parentaf333f9ff1c5e7e31d69f58e4559a14cdcfa4f9d (diff)
Cleaning tests
Diffstat (limited to 'src/pgnp.hpp')
-rw-r--r--src/pgnp.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pgnp.hpp b/src/pgnp.hpp
index 0e9c7a5..53a7a59 100644
--- a/src/pgnp.hpp
+++ b/src/pgnp.hpp
@@ -35,6 +35,7 @@ class PGN {
private:
std::unordered_map<std::string, std::string> tags;
std::vector<std::string> tagkeys;
+ std::string result;
HalfMove *moves;
std::string pgn_content;
@@ -50,6 +51,7 @@ public:
void Dump();
std::vector<std::string> GetTagList();
std::string GetTagValue(std::string);
+ std::string GetResult();
HalfMove *GetMoves();
private:
@@ -72,6 +74,10 @@ struct InvalidTagName : public std::exception {
const char *what() const throw() { return "Invalid tag name"; }
};
+struct InvalidGameResult : public std::exception {
+ const char *what() const throw() { return "Invalid game result"; }
+};
+
struct UnexpectedCharacter : public std::exception {
std::string msg;
UnexpectedCharacter(char actual, char required, int loc) {