summaryrefslogtreecommitdiff
path: root/chesshelpers.h
blob: 0f1de345272b47b386b8c0db5cb9265915906c56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "vector.h"
#ifndef CHESS_HELPERS
#define CHESS_HELPERS
typedef enum {
	pawn = 1,
	knight = 2,
	bishop = 3,
	rook = 4,
	queen = 5,
	king = 6,
} piece_t;
int in_board(vector_t position);
int is_empty(int board[8][8], vector_t position);
int is_color(int board[8][8], vector_t position, int color);
char* get_readable_coords(vector_t position);
char* get_move_name(int board[8][8], vector_t origin, vector_t end);
int** clone_board(int board[8][8]);
#endif