Chess Engine
A Chess Engine project written in C++.
Loading...
Searching...
No Matches
game.hpp
1#pragma once
2
3#include <string>
4
5#include "position.hpp"
6
7class Game {
8 public:
9 void start() { m_position.setFromFEN(); }
10 void reset() { m_position.setFromFEN("8/8/8/8/8/8/8/8"); }
11
12 void doMove(const std::string /*moveString*/) { m_position.doMove(Move()); }
13 void doMove(int /*from*/, int /*to*/) { m_position.doMove(Move()); }
14 // dummy wrapper for the position
15 // ensures encapsulation without game.getPosition().doMove()
16 // the same should be implemented with undo
17
18 void perft(int /*depth*/) {}
19 // get setters for string
20 [[nodiscard]] std::string title() const { return m_title; }
21
22 private:
23 Position m_position;
24 std::string m_title;
25 std::pair<std::string, std::string> m_opponents;
26};
Definition game.hpp:7
Definition position.hpp:16
Definition move.hpp:64