My Project
core
osl
move_classifier
check_.h
Go to the documentation of this file.
1
/* check_.h
2
*/
3
#ifndef OSL_MOVE_CLASSIFIER_CHECK_H
4
#define OSL_MOVE_CLASSIFIER_CHECK_H
5
#include "
osl/move_classifier/openCheck.h
"
6
#include "
osl/move_classifier/directCheck.h
"
7
namespace
osl
8
{
9
namespace
move_classifier
10
{
14
template
<Player P>
15
struct
Check
16
{
20
static
bool
isMember
(
const
NumEffectState
& state,
21
Ptype
ptype,
Square
from,
Square
to){
22
if
(
DirectCheck<P>::isMember
(state,ptype,to))
23
return
true
;
24
if
(from.
isPieceStand
())
25
return
false
;
26
return
OpenCheck<P>::isMember
(state,ptype,from,to);
27
}
28
};
29
}
// namespace move_classifier
30
}
// namespace osl
31
#endif
/* _MOVE_CLASSIFIER_CHECK_H */
32
// ;;; Local Variables:
33
// ;;; mode:c++
34
// ;;; c-basic-offset:2
35
// ;;; End:
osl::NumEffectState
利きを持つ局面
Definition
numEffectState.h:34
osl::Square
Definition
basic_type.h:532
osl::Square::isPieceStand
bool isPieceStand() const
Definition
basic_type.h:576
directCheck.h
osl
Definition
additionalEffect.h:6
osl::Ptype
Ptype
駒の種類を4ビットでコード化する
Definition
basic_type.h:84
openCheck.h
osl::move_classifier::Check
Definition
check_.h:16
osl::move_classifier::Check::isMember
static bool isMember(const NumEffectState &state, Ptype ptype, Square from, Square to)
promote move の時 ptypeはpromote後のもの
Definition
check_.h:20
osl::move_classifier::DirectCheck
Definition
directCheck.h:14
osl::move_classifier::OpenCheck::isMember
static bool isMember(const NumEffectState &state, Ptype ptype, Square from, Square to)
Definition
openCheck.h:17
Generated by
1.9.8