engine.h 1.15 KB
#ifndef ENGINE_H
#define ENGINE_H



#include "utility.h"

#include <basic_types.h>
#include <engine_interface.h>


namespace othello
{
/*
    class OpeningBook {
      // ...
    };

    class GreenBookWormAI : public AIInterface {
    public:
      GreenBookWormAI( const OpeningBook& openingbook )
        : m_openingbook{openingbook} {}
      // ...
    private:
      const OpeningBook m_openingbook;
    };
*/

  class OthelloGameEngine : public othello::GameEngineInterface {
    // GameEngineInterface interface

      PlayerId m_playerid = PlayerId::One;

  public:
    bool initNewGame() override;
    void clearGame() override;
    bool performMoveForCurrentHuman(const othello::BitPos&) override;
    bool legalMovesCheck();
    void switchCurrentPlayerId();

    void                think(const std::chrono::seconds&) override;
    othello::PlayerId   currentPlayerId() const override;
    othello::PlayerType currentPlayerType() const override;
    othello::BitPieces  pieces(const othello::PlayerId&) const override;

    const othello::BitBoard& board() const override;

//    const OpeningBook m_openingbook;

  };

} // namespace othello
#endif   // ENGINE_H