-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmove.h
34 lines (21 loc) · 803 Bytes
/
move.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
#ifndef _MOVE_H
#define _MOVE_H
#include "global.h"
/**********************************************************/
/* Struct to store Move and color of the player */
typedef struct
{
char tile[ 2 ][ MAXIMUM_MOVE_SIZE ];
char color;
} Move;
/**********************************************************/
/*
Caution!
tile[0][0] and tile[1][0] holds the row and col of the piece we want to move!
All the other coordinates are the tiles that this piece will go to.
for a move to be valid the tile[0][i+1] (where tile[0][i] holds the row of the last tile of our move) must be -1.
Only exception to this is when we have to make the maximum number of moves.
A Null move (the only legal move when we cannot move) has tile[0][0] = -1.
Server can ask for a move even we have none available.
*/
#endif