count.h Source File

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
count.h
Go to the documentation of this file.
1 /* count.h
2 */
3 #ifndef _MOVE_ACTION_COUNT_H
4 #define _MOVE_ACTION_COUNT_H
5 #include "osl/piece.h"
6 namespace osl
7 {
8 namespace move_action
9 {
13 struct Count
14 {
15 int count;
16 Count() : count(0)
17 {
18 }
20 void simpleMove(Square /*from*/,Square /*to*/,Ptype /*ptype*/, bool /*isPromote*/,Player /*p*/,Move){
21 count++;
22 }
32 void unknownMove(Square /*from*/,Square /*to*/,Piece /*p1*/,Ptype /*ptype*/,bool /*isPromote*/,Player /*p*/,Move){
33 count++;
34 }
36 void dropMove(Square /*to*/,Ptype /*ptype*/,Player /*p*/,Move ){
37 count++;
38 }
39 // old interfaces
40 void simpleMove(Square from,Square to,Ptype ptype,
41 bool isPromote,Player p)
42 {
43 simpleMove(from,to,ptype,isPromote,p,Move());
44 }
45 void unknownMove(Square from,Square to,Piece captured,
46 Ptype ptype,bool isPromote,Player p)
47 {
48 unknownMove(from,to,captured,ptype,isPromote,p,Move());
49 }
50 void dropMove(Square to,Ptype ptype,Player p)
51 {
52 dropMove(to,ptype,p,Move());
53 }
54 };
55 } // namespace move_action
56 } // namespace osl
57
58 #endif /* _MOVE_ACTION_COUNT_H */
59 // ;;; Local Variables:
60 // ;;; mode:c++
61 // ;;; c-basic-offset:2
62 // ;;; End: