allMoves.h
Go to the documentation of this file.
#ifndef OSL_GENERATE_ALL_MOVES_H
#define OSL_GENERATE_ALL_MOVES_H
#include "osl/numEffectState.h"
#include "osl/move_generator/move_action.h"
namespace osl
{
namespace move_generator
{
template<class Action>
class AllMoves
{
public:
template<Player P>
static void generateOnBoard(const NumEffectState& state, Action& action);
template<Player P>
static void generate(const NumEffectState& state, Action& action);
static void generate(Player p, const NumEffectState& state, Action& action)
{
if(p==BLACK)
generate<BLACK>(state,action);
else
generate<WHITE>(state,action);
}
};
} // namespace move_generator
struct GenerateAllMoves
{
static void generate(Player p, const NumEffectState& state, MoveVector&);
template <Player P>
static void generate(const NumEffectState& state, MoveVector& out)
{
typedef move_action::Store store_t;
store_t store(out);
move_generator::AllMoves<store_t>::generate<P>(state, store);
}
template <Player P>
static void generateOnBoard(const NumEffectState& state, MoveVector& out)
{
typedef move_action::Store store_t;
store_t store(out);
move_generator::AllMoves<store_t>::generateOnBoard<P>(state, store);
}
};
} // namespace osl
#endif /* OSL_GENERATE_ALL_MOVES_H */
// ;;; Local Variables:
// ;;; mode:c++
// ;;; c-basic-offset:2
// ;;; End:
osl::MoveVector
Definition container.h:293
osl::NumEffectState
利きを持つ局面
Definition numEffectState.h:34
osl::move_generator::AllMoves
Move::ignoreUnpromote() でないすべての手を生成
Definition allMoves.h:16
osl::move_generator::AllMoves::generateOnBoard
static void generateOnBoard(const NumEffectState &state, Action &action)
osl::move_generator::AllMoves::generate
static void generate(Player p, const NumEffectState &state, Action &action)
Definition allMoves.h:34
osl::move_generator::AllMoves::generate
static void generate(const NumEffectState &state, Action &action)
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::GenerateAllMoves
Definition allMoves.h:46
osl::GenerateAllMoves::generateOnBoard
static void generateOnBoard(const NumEffectState &state, MoveVector &out)
Definition allMoves.h:56
osl::GenerateAllMoves::generate
static void generate(Player p, const NumEffectState &state, MoveVector &)
Definition allMoves.cc:15
osl::GenerateAllMoves::generate
static void generate(const NumEffectState &state, MoveVector &out)
Definition allMoves.h:49
osl::move_action::Store
指手を MoveVector に保管
Definition move_action.h:16