open.h
Go to the documentation of this file.
#ifndef OSL_GENERATE_OPEN_MOVES_H
#define OSL_GENERATE_OPEN_MOVES_H
#include "osl/move_generator/pieceOnBoard.h"
#include "osl/move_generator/move_action.h"
#include "osl/numEffectState.h"
namespace osl
{
namespace move_generator
{
template<class Action>
class Open
{
public:
template<Player P>
static void generate(const NumEffectState& state,Piece p,Action& action,Square to,Direction dir);
};
struct GenerateOpen
{
template<class Action>
static void
generate(Player pl,const NumEffectState& state,Piece p,
Action& action,Square to,Direction dir)
{
if (pl == BLACK)
Open<Action>::template generate<BLACK>(state, p, action, to, dir);
else
Open<Action>::template generate<WHITE>(state, p, action, to, dir);
}
};
} // namespace move_generator
} // namespace osl
#endif /* OSL_GENERATE_OPEN_MOVES_H */
// ;;; Local Variables:
// ;;; mode:c++
// ;;; c-basic-offset:2
// ;;; End:
osl::NumEffectState
利きを持つ局面
Definition numEffectState.h:34
osl::Piece
駒.
Definition basic_type.h:788
osl::Square
Definition basic_type.h:532
osl::move_generator::Open
長い利きを止めている駒を動かして, 利きを伸ばす.
Definition open.h:18
osl::move_generator::Open::generate
static void generate(const NumEffectState &state, Piece p, Action &action, Square to, Direction dir)
move_action.h
osl::move_generator
Definition addEffectWithEffect.cc:10
osl
Definition additionalEffect.h:6
osl::Direction
Direction
Definition basic_type.h:310
osl::Player
Player
Definition basic_type.h:8
osl::BLACK
@ BLACK
Definition basic_type.h:9
numEffectState.h
pieceOnBoard.h
osl::move_generator::GenerateOpen
Definition open.h:26
osl::move_generator::GenerateOpen::generate
static void generate(Player pl, const NumEffectState &state, Piece p, Action &action, Square to, Direction dir)
Definition open.h:29