home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_10_10
/
1010108a
< prev
next >
Wrap
Text File
|
1992-08-10
|
856b
|
52 lines
#ifndef GAME_H
#define GAME_H
typedef enum { PAWN, BISHOP, ROOK, KING } GAME_PIECE;
typedef struct {
int vertical;
} PAWN_MOVE_STRUCT;
typedef PAWN_MOVE_STRUCT *PAWN_MOVE;
typedef struct {
int diagonal;
} BISHOP_MOVE_STRUCT;
typedef BISHOP_MOVE_STRUCT *BISHOP_MOVE;
typedef struct {
int vertical;
int horizontal;
} ROOK_MOVE_STRUCT;
typedef ROOK_MOVE_STRUCT *ROOK_MOVE;
typedef struct {
int vertical;
int horizontal;
int diagonal;
} KING_MOVE_STRUCT;
typedef KING_MOVE_STRUCT *KING_MOVE;
typedef union {
PAWN_MOVE PawnM;
BISHOP_MOVE BishopM;
ROOK_MOVE RookM;
KING_MOVE KingM;
} MOVE_U;
typedef MOVE_U *MOVE;
typedef struct {
GAME_PIECE piece_type;
MOVE moves;
int x_coord;
int y_coord;
} PIECE_STRUCT;
typedef PIECE_STRUCT *PIECE;
#endif /* GAME_H */