Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
include
osl
move_classifier
attackDefenceAroundKing.h
Go to the documentation of this file.
1
/* attackDefenceAroundKing.h
2
*/
3
#ifndef _ATTACK_DEFENCE_AROUND_KING_MC_H
4
#define _ATTACK_DEFENCE_AROUND_KING_MC_H
5
6
#include "
osl/effect_util/neighboring25Direct.h
"
7
#include "
osl/state/numEffectState.h
"
8
#include "
osl/direction.h
"
9
10
namespace
osl
11
{
12
namespace
move_classifier
13
{
22
template
<Player P>
23
struct
AttackDefenceAroundKing
24
{
25
static
bool
26
isMember
(
const
NumEffectState& state,
Move
move)
27
{
28
const
PtypeO
ptypeO = move.
ptypeO
();
29
Square
from = move.
to
();
30
Square
king = state.template kingSquare <P> ();
31
32
return
Neighboring25Direct::hasEffect
(state, ptypeO, from, king);
33
}
34
};
35
}
// namespace move_classifier
36
37
}
// namespace osl
38
39
#endif
/* _ATTACK_DEFENCE_AROUND_KING_MC_H */
40
// ;;; Local Variables:
41
// ;;; mode:c++
42
// ;;; c-basic-offset:2
43
// ;;; End:
Generated on Sun Jul 21 2013 13:37:23 by
1.8.4