count.h
Go to the documentation of this file.
00001 /* count.h
00002  */
00003 #ifndef _MOVE_ACTION_COUNT_H
00004 #define _MOVE_ACTION_COUNT_H
00005 #include "osl/piece.h"
00006 namespace osl
00007 {
00008   namespace move_action
00009   {
00013     struct Count
00014     {
00015       int count;
00016       Count() : count(0)
00017       {
00018       }
00020       void simpleMove(Square /*from*/,Square /*to*/,Ptype /*ptype*/, bool /*isPromote*/,Player /*p*/,Move){
00021         count++;
00022       }
00032       void unknownMove(Square /*from*/,Square /*to*/,Piece /*p1*/,Ptype /*ptype*/,bool /*isPromote*/,Player /*p*/,Move){
00033         count++;
00034       }
00036       void dropMove(Square /*to*/,Ptype /*ptype*/,Player /*p*/,Move ){
00037         count++;
00038       }
00039       // old interfaces
00040       void simpleMove(Square from,Square to,Ptype ptype, 
00041                       bool isPromote,Player p)
00042       {
00043         simpleMove(from,to,ptype,isPromote,p,Move());
00044       }
00045       void unknownMove(Square from,Square to,Piece captured,
00046                        Ptype ptype,bool isPromote,Player p)
00047       {
00048         unknownMove(from,to,captured,ptype,isPromote,p,Move());
00049       }
00050       void dropMove(Square to,Ptype ptype,Player p)
00051       {
00052         dropMove(to,ptype,p,Move());
00053       }
00054     };
00055   } // namespace move_action
00056 } // namespace osl
00057 
00058 #endif /* _MOVE_ACTION_COUNT_H */
00059 // ;;; Local Variables:
00060 // ;;; mode:c++
00061 // ;;; c-basic-offset:2
00062 // ;;; End:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines