-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstack.h
More file actions
49 lines (28 loc) · 784 Bytes
/
stack.h
File metadata and controls
49 lines (28 loc) · 784 Bytes
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
// header file for the stack data structure used for storing a copy of the state of the board whenever making a move
#ifndef STACK_H
#define STACK_H
#include "board.h"
//#include "moves.c"
/*
Stack data structure for storing metadata of game state before making moves
ie. {
captured piece
en passant possibilities
castling rights
halfmove clock
}
*/
struct StackObject {
PieceType capturedPiece;
// board structure's Meta struct
struct Meta meta;
};
typedef struct StackObject StackObject;
struct Stack {
StackObject stackArray[512]; // maximum depth of search
unsigned short size;
};
typedef struct Stack Stack;
void push(StackObject stObj, Stack *stack);
StackObject pop(Stack *stack);
#endif