00001
00002
00003 #ifndef _STOREMOVEACTION_H
00004 #define _STOREMOVEACTION_H
00005 #include "osl/container/moveVector.h"
00006 #include "osl/piece.h"
00007
00008 namespace osl
00009 {
00010 namespace move_action
00011 {
00015 struct Store
00016 {
00017 MoveVector *moves;
00018 Store(MoveVector& v) : moves(&v)
00019 {
00020 }
00022 void simpleMove(Position from,Position to,Ptype ptype, bool isPromote,Player p){
00023 Move move=Move(from,to,ptype,PTYPE_EMPTY,isPromote,p);
00024 assert(move.isValid());
00025 moves->push_back(move);
00026 }
00036 void unknownMove(Position from,Position to,Piece p1,Ptype ptype,bool isPromote,Player p)
00037 {
00038 Move move = Move(from,to,ptype,p1.ptype(),isPromote,p);
00039 assert(move.isValid());
00040 moves->push_back(move);
00041 }
00043 void dropMove(Position to,Ptype ptype,Player p)
00044 {
00045 Move move=Move(to,ptype,p);
00046 assert(move.isValid());
00047 moves->push_back(move);
00048 }
00049 };
00050 }
00051 }
00052
00053 #endif
00054
00055
00056
00057