-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstructs (1).h
88 lines (70 loc) · 1.64 KB
/
structs (1).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
82
83
84
85
86
87
88
#ifndef _structs_Header
#define _structs_Header
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <time.h>
#include <math.h>
#define SIZE 9
#define FINISH_SUCCESS 0
#define NOT_FINISH 1
#define FINISH_FAILURE -1
#define FILLED 1
#define FAIL -1
typedef struct _Array
{
short* arr;
unsigned short size;
} CellPossibilities;
typedef CellPossibilities CellPossibilities;
typedef struct _cellLocation
{
unsigned short row;
unsigned short col;
}cellLocation;
typedef struct cellListNode_ {
cellLocation location;
struct cellListNode_* next;
struct cellListNode_* prev;
}cellListNode;
typedef struct cellList_ {
cellListNode* head;
cellListNode* tail;
}cellList;
typedef struct playerData_ {
char name[100];
short* board;
CellPossibilities*** possibilities;
int numOfInitials;
}playerData;
typedef struct playerListNode_ {
playerData* player;
struct playerListNode_* next;
struct playerListNode_* prev;
}playerListNode;
typedef struct playerList_ {
playerListNode* head;
playerListNode* tail;
}playerList;
typedef struct winnerListNode_ {
playerData* player;
struct winnerListNode_* next;
struct winnerListNode_* prev;
}winnerListNode;
typedef struct winnerList_ {
winnerListNode* head;
winnerListNode* tail;
}winnerList;
typedef struct treeNode
{
playerListNode** data;
struct treeNode* left;
struct treeNode* right;
} TreeNode;
typedef struct tree
{
TreeNode* root;
} Tree;
#endif // !_structs_Header