-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathBoardUpdater.h
36 lines (27 loc) · 1.16 KB
/
BoardUpdater.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//-----------------------------------------------------------------------------
/** @file libpentobi_base/BoardUpdater.h
@author Markus Enzenberger
@copyright GNU General Public License version 3 or later */
//-----------------------------------------------------------------------------
#ifndef LIBPENTOBI_BASE_BOARD_UPDATER_H
#define LIBPENTOBI_BASE_BOARD_UPDATER_H
#include "Board.h"
#include "PentobiTree.h"
namespace libpentobi_base {
//-----------------------------------------------------------------------------
/** Updates a board state to a node in a game tree. */
class BoardUpdater
{
public:
/** Update the board to a node.
@throws Exception if tree contains invalid properties, moves that play
the same piece twice or other conditions that prevent the updater to
update the board to the given node. */
void update(Board& bd, const PentobiTree& tree, const SgfNode& node);
private:
/** Local variable reused for efficiency. */
vector<const SgfNode*> m_path;
};
//-----------------------------------------------------------------------------
} // namespace libpentobi_base
#endif // LIBPENTOBI_BASE_BOARD_UPDATER_H