00001 #ifndef _GENERATE_OPEN_MOVES_H
00002 #define _GENERATE_OPEN_MOVES_H
00003 #include "osl/move_generator/pieceOnBoard.h"
00004 #include "osl/move_generator/promoteType.h"
00005 #include "osl/move_action/concept.h"
00006 #include "osl/state/numEffectState.h"
00007 #include <boost/static_assert.hpp>
00008
00009
00010
00011 namespace osl
00012 {
00013 namespace move_generator
00014 {
00020 template<class Action>
00021 class Open
00022 {
00023
00024 public:
00025 template<Player P>
00026 static void generate(const NumEffectState& state,Piece p,Action& action,Position to,Direction dir);
00027
00028 };
00029
00030 struct GenerateOpen
00031 {
00032 template<class Action>
00033 static void
00034 generate(Player pl,const NumEffectState& state,Piece p,
00035 Action& action,Position to,Direction dir)
00036 {
00037 if (pl == BLACK)
00038 Open<Action>::template generate<BLACK>(state, p, action, to, dir);
00039 else
00040 Open<Action>::template generate<WHITE>(state, p, action, to, dir);
00041 }
00042 };
00043
00044 }
00045 }
00046 #endif
00047
00048
00049
00050