addEffectWithEffect.h
Go to the documentation of this file.
#ifndef OSL_MOVE_GENERATER_ADD_EFFECT_WITH_EFFECT_H
#define OSL_MOVE_GENERATER_ADD_EFFECT_WITH_EFFECT_H
#include "osl/move_generator/move_action.h"
#include "osl/numEffectState.h"
namespace osl
{
namespace move_generator
{
template<class Action>
class AddEffectWithEffect
{
public:
template<Player P,bool isAttackToKing>
static void generate(const NumEffectState& state,Square target,Action& action,bool& hasPawnCheckmate);
template<Player P,bool isAttackToKing>
static void generate(const NumEffectState& state,Square target,Action& action){
bool dummy;
generate<P,isAttackToKing>(state,target,action,dummy);
}
};
struct GenerateAddEffectWithEffect
{
template<bool isAttackToKing>
static void generate(Player player, const NumEffectState& state, Square target,
move_action::Store& store);
template<bool isAttackToKing>
static void generate(Player player,const NumEffectState& state,Square target,MoveVector& out, bool& has_pawn_checkmate) {
move_action::Store store(out);
if(player==BLACK)
AddEffectWithEffect<move_action::Store>::template generate<BLACK,isAttackToKing>(state,target,store,has_pawn_checkmate);
else
AddEffectWithEffect<move_action::Store>::template generate<WHITE,isAttackToKing>(state,target,store,has_pawn_checkmate);
}
template<bool isAttackToKing>
static void generate(Player player,const NumEffectState& state,Square target,MoveVector& out) {
bool dummy;
generate<isAttackToKing>(player,state,target,out,dummy);
}
};
} // namespace move_generator
} // namespace osl
#endif /* OSL_MOVE_GENERATER_ADD_EFFECT_WITH_EFFECT_H */
// ;;; Local Variables:
// ;;; mode:c++
// ;;; c-basic-offset:2
// ;;; End:
osl::MoveVector
Definition container.h:293
osl::NumEffectState
利きを持つ局面
Definition numEffectState.h:34
osl::Square
Definition basic_type.h:532
osl::move_generator::AddEffectWithEffect
利きをつける手を生成 利きを持つstateでしか使えない.
Definition addEffectWithEffect.h:27
osl::move_generator::AddEffectWithEffect::generate
static void generate(const NumEffectState &state, Square target, Action &action)
Definition addEffectWithEffect.h:32
osl::move_generator::AddEffectWithEffect::generate
static void generate(const NumEffectState &state, Square target, Action &action, bool &hasPawnCheckmate)
move_action.h
osl::move_generator
Definition addEffectWithEffect.cc:10
osl
Definition additionalEffect.h:6
osl::Player
Player
Definition basic_type.h:8
osl::BLACK
@ BLACK
Definition basic_type.h:9
numEffectState.h
osl::move_action::Store
指手を MoveVector に保管
Definition move_action.h:16
osl::move_generator::GenerateAddEffectWithEffect
Definition addEffectWithEffect.h:38
osl::move_generator::GenerateAddEffectWithEffect::generate
static void generate(Player player, const NumEffectState &state, Square target, move_action::Store &store)
対象とするマスに利きを付ける手を生成する.
osl::move_generator::GenerateAddEffectWithEffect::generate
static void generate(Player player, const NumEffectState &state, Square target, MoveVector &out, bool &has_pawn_checkmate)
Definition addEffectWithEffect.h:47
osl::move_generator::GenerateAddEffectWithEffect::generate
static void generate(Player player, const NumEffectState &state, Square target, MoveVector &out)
Definition addEffectWithEffect.h:55