-
Notifications
You must be signed in to change notification settings - Fork 3
/
PET_evaluator.h
82 lines (60 loc) · 1.65 KB
/
PET_evaluator.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/* Evaluator selector for PET testbed
Sets the "Evaluator Under Test"(EUT) and includes the adapter file
compile with -DTESTXXX to include evaluator xxx.
(c) 2015 Adam Shelly (github.com/ashelly)
*/
#if TESTNUL
#include "nul_eval.h"
#define EUT NUL
#elif TESTACE
#include "ace_eval/ACE_eval.h"
#define EUT ACE
#elif TESTTPT
#include "twoplustwo/TPT_eval.h"
#define EUT TPT
#elif TESTKEV
#include "cactuskev/KEV_eval.h"
#define EUT KEV
#elif TESTHES
#include "showdown/HES_eval.h"
#define EUT HES
#elif TESTBHS
#include "showdown/BHS_eval.h"
#define EUT BHS
#elif TESTPSE
#include "pokersource/PSE_eval.h"
#define EUT PSE
#elif TESTSNZ
#include "senzee/SNZ_eval.h"
#define EUT SNZ
#elif TESTPHK
#include "perfecthash/PHK_eval.h"
#define EUT PHK
#elif TESTHAM
#include "hammer/HAM_eval.h"
#define EUT HAM
#elif TESTSPK
#include "specialk/SPK_eval.h"
#define EUT SPK
/*Copy the following 3 lines, paste above this, and replace 'XXX' and 'newdir' */
#elif TESTXXX
#include "newdir/XXX_eval.h"
#define EUT XXX
#endif
/* These macros transform evaluator calls to PET_method
to calls to XXX_Method, where XXX is the EvaluatorUnderTest.
*/
#define STRINGIZE(a) #a
#define PET_STR(a) STRINGIZE(a)
#define PET_CONCAT(a,b) a ## b
#define PET_MAKENAME(a,b) PET_CONCAT(a,b)
#define EUT_NAME(b) PET_MAKENAME(EUT,b)
#define PETHAND EUT_NAME(HAND)
#define PET_init EUT_NAME(_init)
#define PET_makecard EUT_NAME(_makecard)
#define PET_addcard EUT_NAME(_addcard)
#define PET_evaluate EUT_NAME(_evaluate)
#define PET_rank EUT_NAME(_rank)
#define PET_ranktran EUT_NAME(_ranktran)
#define PET_decode EUT_NAME(_decode)
#define PET_DECODES_CARDS EUT_NAME(_DECODES_CARDS)