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 <boost/concept_check.hpp>
00009
00010 namespace osl
00011 {
00012 namespace move_action
00013 {
00017 class MoveAction
00018 {
00019 public:
00021 void simpleMove(Position from,Position to,Ptype ptype,
00022 bool isPromote,Player p);
00023
00025 void unknownMove(Position from,Position to,Piece captured,
00026 Ptype ptype,bool isPromote,Player p);
00028 void dropMove(Position to,Ptype ptype,Player p);
00029 };
00030
00035 template <class T>
00036 struct Concept
00037 {
00039 void constraints()
00040 {
00041
00042
00043
00044
00045
00046 simple = &T::simpleMove;
00047 unknown = &T::unknownMove;
00048 drop = &T::dropMove;
00049 }
00050 void (T::*simple)(Position, Position, Ptype, bool, Player);
00051 void (T::*unknown)(Position, Position, Piece, Ptype, bool, Player);
00052 void (T::*drop)(Position, Ptype, Player);
00053 };
00054 }
00055 }
00056
00057
00058 #endif
00059
00060
00061
00062