Add placeholder engine and search
This commit is contained in:
19
BasicEngine.cpp
Normal file
19
BasicEngine.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
#include "BasicEngine.hpp"
|
||||
|
||||
std::string BasicEngine::name() const {
|
||||
return mName;
|
||||
}
|
||||
std::string BasicEngine::version() const {
|
||||
return mVersion;
|
||||
}
|
||||
std::string BasicEngine::author() const {
|
||||
return mAuthor;
|
||||
}
|
||||
void BasicEngine::newGame() {
|
||||
|
||||
}
|
||||
PrincipalVariation BasicEngine::pv(const Board &board, const TimeInfo::Optional &timeInfo) {
|
||||
(void)board;
|
||||
(void)timeInfo;
|
||||
return PrincipalVariation();
|
||||
}
|
23
BasicEngine.hpp
Normal file
23
BasicEngine.hpp
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef CHESS_ENGINE_BASICENGINE_HPP
|
||||
#define CHESS_ENGINE_BASICENGINE_HPP
|
||||
|
||||
#include "Engine.hpp"
|
||||
class BasicEngine final : public Engine {
|
||||
|
||||
public:
|
||||
|
||||
std::string name() const override;
|
||||
std::string version() const override;
|
||||
std::string author() const override;
|
||||
void newGame() override;
|
||||
PrincipalVariation pv(const Board &board, const TimeInfo::Optional &timeInfo) override;
|
||||
|
||||
private:
|
||||
|
||||
std::string mName = "Egon++";
|
||||
std::string mVersion = "1.0~Egon+C";
|
||||
std::string mAuthor = "Bols";
|
||||
|
||||
};
|
||||
|
||||
#endif //CHESS_ENGINE_BASICENGINE_HPP
|
@@ -41,7 +41,9 @@ add_library(cplchess_lib OBJECT
|
||||
Uci.cpp
|
||||
BitBoard.cpp
|
||||
MoveGenerator.cpp
|
||||
BoardState.hpp)
|
||||
Search.cpp
|
||||
BasicEngine.cpp
|
||||
)
|
||||
|
||||
target_include_directories(cplchess_lib PUBLIC .)
|
||||
|
||||
|
@@ -1,5 +1,8 @@
|
||||
#include "EngineFactory.hpp"
|
||||
|
||||
#include <memory>
|
||||
#include "BasicEngine.hpp"
|
||||
|
||||
std::unique_ptr<Engine> EngineFactory::createEngine() {
|
||||
return nullptr;
|
||||
return std::make_unique<BasicEngine>();
|
||||
}
|
||||
|
3
Search.cpp
Normal file
3
Search.cpp
Normal file
@@ -0,0 +1,3 @@
|
||||
#include "Search.hpp"
|
||||
|
||||
|
8
Search.hpp
Normal file
8
Search.hpp
Normal file
@@ -0,0 +1,8 @@
|
||||
#ifndef CHESS_ENGINE_SEARCH_HPP
|
||||
#define CHESS_ENGINE_SEARCH_HPP
|
||||
|
||||
class Search {
|
||||
|
||||
};
|
||||
|
||||
#endif //CHESS_ENGINE_SEARCH_HPP
|
Reference in New Issue
Block a user