-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathChess.h
More file actions
44 lines (33 loc) · 1.39 KB
/
Chess.h
File metadata and controls
44 lines (33 loc) · 1.39 KB
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
#ifndef CHESS_
#define CHESS_
# include <stdio.h>
# include <stdlib.h>
# include <string.h>
# include <ctype.h>
#define EMPTY ' '
#define BOARD_SIZE 8
#define BOARD(i,j) c->board[i][j]
#define WHITE 1
#define BLACK 0
#define TWO_PLAYERS 1
#define ONE_PLAYER 2
#define PATH_MAX 100
#define ENTER_SETTINGS "Enter game settings:\n"
#define WRONG_GAME_MODE "Wrong game mode\n"
#define TWO_PLAYERS_GAME_MODE "Running game in 2 players mode\n"
#define PLAYER_VS_AI_GAME_MODE "Running game in player vs. AI mode\n"
#define WRONG_MINIMAX_DEPTH "Wrong value for minimax depth. The value should be between 1 to 4\n"
#define WRONG_FILE_NAME "Wrong file name\n"
#define WRONG_POSITION "Invalid position on the board\n"
#define INVALID_SETTING "Setting this piece creates an invalid board\n"
#define NO_PIECE "The specified position does not contain your piece\n"
#define WRONG_BOARD_INITIALIZATION "Wrong board initialization\n"
#define ILLEGAL_COMMAND "Illegal command, please try again\n"
#define ILLEGAL_MOVE "Illegal move\n"
#define WRONG_ROOK_POSITION "Wrong position for a rook\n"
#define ILLEGAL_CASTLING_MOVE "Illegal castling move\n"
#define TIE "The game ends in a tie\n"
#define CHECK "Check!\n"
#define perror_message(func_name) (fprintf(stderr, "Error: standard function %s has failed", func_name));
#define print_message(message) (printf("%s", message));
#endif