-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmoveinfo.h
62 lines (53 loc) · 1.89 KB
/
moveinfo.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
#ifndef MOVEINFO_H
#define MOVEINFO_H
/* $Id: moveinfo.h,v 39.1 1995/04/25 01:48:51 mbayne Exp mbayne $
*
* The information in this file was created by Michael D. Bayne. This
* information is in the public domain. You are permitted to reuse, rewrite,
* bend, fold and mutilate this information. When it comes down to it, all
* this distribution information is pretty much crap anyway and I maintain
* exclusive rights to everything you see here, but go ahead and use it
* anyway. I'm too busy doing cool stuff to sue anyone.
*
* $Log: moveinfo.h,v $
* Revision 39.1 1995/04/25 01:48:51 mbayne
* Initial revision.
*
*/
#ifndef EXEC_LISTS_H
#include <exec/lists.h>
#endif
#ifndef STATE_H
#include "stack.h"
#endif
#ifndef MOVE_H
#include "move.h"
#endif
typedef struct _MoveInfo
{
struct MinNode mi_Node;
struct List mi_Moves;
Move *mi_CurMove;
Stack *mi_Stacks;
struct _MoveInfo *mi_Parent;
int mi_Score;
short mi_SrcStack;
short mi_DestStack;
long mi_Order[8];
} MoveInfo;
#define moveInfoHead(l) (IsListEmpty(l)?0L:(MoveInfo *)(l)->lh_Head)
#define moveInfoHeadNoCheck(l) ((MoveInfo *)(l)->lh_Head)
#define moveInfoTail(l) (IsListEmpty(l)?0L:(MoveInfo *)(l)->lh_TailPred)
#define moveInfoTailNoCheck(l) ((MoveInfo *)(l)->lh_TailPred)
#define moveInfoSucc(mi) ((MoveInfo *)(mi)->mi_Node.mln_Succ)
#define moveInfoPred(mi) ((MoveInfo *)(mi)->mi_Node.mln_Pred)
#define moveInfoEmpty(mi) IsListEmpty(&((mi)->mi_Moves))
#define moveInfoAddHead(l,mi) AddHead((l),(struct Node *)(mi))
#define moveInfoRemHead(l) (MoveInfo *)RemHead(l)
#define moveInfoAddTail(l,mi) AddTail((l),(struct Node *)(mi))
#define moveInfoRemTail(l) (MoveInfo *)RemTail(l)
#ifndef CRITERION_H
#include "criterion.h"
#endif
#include "protos/moveinfo_protos.h"
#endif /* MOVEINFO_H */