00001 #ifndef _MOVE_ACTION_CONCEPT_H
00002 #define _MOVE_ACTION_CONCEPT_H
00003
00004 #include "osl/position.h"
00005 #include "osl/player.h"
00006 #include "osl/piece.h"
00007 #include "osl/ptype.h"
00008 #include "osl/move.h"
00009 #include <boost/concept_check.hpp>
00010
00011 namespace osl
00012 {
00013 namespace move_action
00014 {
00018 class MoveAction
00019 {
00020 public:
00022 void simpleMove(Position from,Position to,Ptype ptype,
00023 bool isPromote,Player p,Move move);
00024
00026 void unknownMove(Position from,Position to,Piece captured,
00027 Ptype ptype,bool isPromote,Player p,Move move);
00029 void dropMove(Position to,Ptype ptype,Player p,Move move);
00030 };
00031
00036 template <class T>
00037 struct Concept
00038 {
00040 void constraints()
00041 {
00042
00043
00044
00045
00046
00047 simple = &T::simpleMove;
00048 unknown = &T::unknownMove;
00049 drop = &T::dropMove;
00050 }
00051 void (T::*simple)(Position, Position, Ptype, bool, Player,Move);
00052 void (T::*unknown)(Position, Position, Piece, Ptype, bool, Player,Move);
00053 void (T::*drop)(Position, Ptype, Player,Move);
00054 };
00055 }
00056 }
00057
00058
00059 #endif
00060
00061
00062
00063