-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rules.h
35 lines (29 loc) · 846 Bytes
/
Rules.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef RULES_H
#define RULES_H
/*
* Generates declarations for Rule classes.
*
*/
#include "Rule.h"
using namespace std;
#define DECLARE_RULE(X) \
class X : public Rule \
{ \
public: \
X(Rule* next_p) : Rule(next_p) {}; \
virtual ~X() {}; \
\
virtual int getMove(const Player* human_p, \
const Player* computer_p, \
const Game* game_p); \
};
DECLARE_RULE(Rule1)
DECLARE_RULE(Rule2)
DECLARE_RULE(Rule3)
DECLARE_RULE(Rule4)
DECLARE_RULE(Rule5)
DECLARE_RULE(Rule6)
DECLARE_RULE(Rule7)
DECLARE_RULE(Rule8)
DECLARE_RULE(LastRule)
#endif // RULES_H