forked from omeredel/Chess-In-C
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Game.h
74 lines (39 loc) · 1.8 KB
/
Game.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
#ifndef GAME_H_
#define GAME_H_
#include <stdio.h>
#include <stdlib.h>
#include "Chess.h"
#include "Moves.h"
Move *xyMoves(char board[BOARD_SIZE][BOARD_SIZE], int color, int x, int y);
int move(char board[BOARD_SIZE][BOARD_SIZE], int color, int x, int y, int xnew, int ynew, char ch);
char selectPromotionPiece(int color);
int promotionIfGui();
char piece(int color, char *str);
char* whichType(char p);
char* whichTypeExtended(char p);
int blackOrWhite(char);
void removeSpaces(char* str);
void initCastling(char board[BOARD_SIZE][BOARD_SIZE]);
void updateCastling(char board[BOARD_SIZE][BOARD_SIZE], int x, int y);
void initHistory();
void undoMove(char board[BOARD_SIZE][BOARD_SIZE]);
void undoGivenMove(char *moveToUndo, char board[BOARD_SIZE][BOARD_SIZE], int color);
void popHistoryStack();
void insertHistoryStack();
void saveMove(int x, int y, int xnew, int ynew, char board[BOARD_SIZE][BOARD_SIZE]);
int getScore(char board[BOARD_SIZE][BOARD_SIZE], int color, unsigned int depth, int x, int y, int xnew, int ynew, char ch);
int save(char board[BOARD_SIZE][BOARD_SIZE], char *s);
void copyString(char *target, char *source);
int callFunction(char board[BOARD_SIZE][BOARD_SIZE], int depth, char *str, int color);
void SettingsState(char board[BOARD_SIZE][BOARD_SIZE]);
int UserState(char board[BOARD_SIZE][BOARD_SIZE]);
int GameState(char board[BOARD_SIZE][BOARD_SIZE]);
void clear(char board[BOARD_SIZE][BOARD_SIZE]);
int restart(char board[BOARD_SIZE][BOARD_SIZE]);
void initBoard(char board[BOARD_SIZE][BOARD_SIZE]);
int valid(char board[BOARD_SIZE][BOARD_SIZE]);
void countPieces(int counter[2][6], char board[BOARD_SIZE][BOARD_SIZE]);
int countPlayerPieces(int playerColor, char board[BOARD_SIZE][BOARD_SIZE]);
void settingsToDefault();
void mainConsole(char board[BOARD_SIZE][BOARD_SIZE]);
#endif