| 1 |
/* blockingSimulation.h |
| 2 |
*/ |
| 3 |
#ifndef _BLOCKING_SIMULATION_H |
| 4 |
#define _BLOCKING_SIMULATION_H |
| 5 |
|
| 6 |
#include "osl/state/numEffectState.h" |
| 7 |
#include "osl/hash/hashKey.h" |
| 8 |
namespace osl |
| 9 |
{ |
| 10 |
class PathEncoding; |
| 11 |
namespace checkmate |
| 12 |
{ |
| 13 |
class CheckHashRecord; |
| 14 |
class CheckMove; |
| 15 |
/** |
| 16 |
* @param P 攻撃側 |
| 17 |
*/ |
| 18 |
template <Player P> |
| 19 |
struct BlockingSimulation |
| 20 |
{ |
| 21 |
/** 現在の局面と record で 中合の move を指した時に |
| 22 |
* 兄弟ノードから oracle を探してシミュレーションする |
| 23 |
*/ |
| 24 |
template <class Table> |
| 25 |
static bool proof(NumEffectState& state, |
| 26 |
const HashKey& new_key, const PathEncoding& new_path, |
| 27 |
const CheckHashRecord *record, Table& table, |
| 28 |
const CheckMove& move, size_t& node_count); |
| 29 |
/** |
| 30 |
* oracle で詰んだ時に,oracle.move.to() が同じ兄弟が |
| 31 |
* 詰むかどうかをシミュレーションする. |
| 32 |
*/ |
| 33 |
template <class Table> |
| 34 |
static void proofSibling(NumEffectState& state, |
| 35 |
const HashKey& key, const PathEncoding& path, |
| 36 |
CheckHashRecord *record, Table& table, |
| 37 |
const CheckMove& oracle, size_t& node_count); |
| 38 |
private: |
| 39 |
/** |
| 40 |
* target を指した後,guide と同様につむかどうかを確かめる |
| 41 |
*/ |
| 42 |
template <class Table> |
| 43 |
static bool proof(NumEffectState& state, |
| 44 |
const HashKey&, const PathEncoding&, Table& table, |
| 45 |
const CheckMove& target, const CheckHashRecord *guide, |
| 46 |
size_t& node_count); |
| 47 |
|
| 48 |
}; |
| 49 |
} // namespace checkmate |
| 50 |
} // namespace osl |
| 51 |
|
| 52 |
#endif /* _BLOCKING_SIMULATION_H */ |
| 53 |
// ;;; Local Variables: |
| 54 |
// ;;; mode:c++ |
| 55 |
// ;;; c-basic-offset:2 |
| 56 |
// ;;; End: |