Forráskód Böngészése

forgot to add files for info about engine

nicolaswinkler 7 éve
szülő
commit
9f3a11845e
2 módosított fájl, 73 hozzáadás és 0 törlés
  1. 26 0
      src/EngineInfo.cpp
  2. 47 0
      src/EngineInfo.h

+ 26 - 0
src/EngineInfo.cpp

@@ -0,0 +1,26 @@
+#include "EngineInfo.h"
+
+namespace chessy
+{
+    namespace info
+    {
+        using namespace std;
+
+        short   version[3] = {1, 0, 0};
+        string  versionString =
+            to_string(version[0]) + "." +
+            to_string(version[1]) + "." +
+            to_string(version[2]);
+        string  longName = "Chessy Chess Engine";
+        string  shortName = "Chessy";
+
+        string  welcomeText = "Welcome to "s + shortName +
+            " (Version " + versionString + ").";
+
+        string  helpText =
+            "This is the Chessy Chess Engine.\n\n"
+            "It uses the Universal Chess Interface (UCI).\n\n"
+            "Have fun playing!";
+    }
+}
+

+ 47 - 0
src/EngineInfo.h

@@ -0,0 +1,47 @@
+#ifndef CHESSY_ENGINEINFO_H_
+#define CHESSY_ENGINEINFO_H_
+
+#include <string>
+
+namespace chessy
+{
+    /*!
+     * This namespace contains general attributes and information about
+     * the program.
+     */
+    namespace info
+    {
+        /*!
+         * the version number of this release of chessy
+         */
+        extern short        version[3];
+
+        /*!
+         * this is the version number as a string (numbers separated by dots).
+         */
+        extern std::string  versionString;
+
+        /*!
+         * the full long name of this engine
+         */
+        extern std::string  longName;
+        
+        /*!
+         * a short name for this engine
+         */
+        extern std::string  shortName;
+        
+        /*!
+         * text that is displayed as the engine starts.
+         */
+        extern std::string  welcomeText;
+
+        /*!
+         * short decription of the engine.
+         */
+        extern std::string  helpText;
+    }
+}
+
+#endif // CHESSY_ENGINEINFO_H_
+