home *** CD-ROM | disk | FTP | other *** search
- /****************************************************************************/
- /** **/
- /** Connect-4 Algorithm **/
- /** **/
- /** Version 3.2 **/
- /** **/
- /** By Keith Pomakis **/
- /** (pomakis@pobox.com) **/
- /** **/
- /** June, 1996 **/
- /** **/
- /****************************************************************************/
- /** **/
- /** See the file "c4.c" for documentation. **/
- /** **/
- /****************************************************************************/
-
- #ifndef C4_DEFINED
- #define C4_DEFINED
-
- #ifndef Boolean
- #define Boolean unsigned char
- #endif
-
- #ifndef TRUE
- #define TRUE 1
- #endif
-
- #ifndef FALSE
- #define FALSE 0
- #endif
-
- #define C4_NONE 2
- #define C4_MAX_LEVEL 16
-
- /* See the file "c4.c" for documentation on the following functions. */
-
- extern void c4_poll(void (*poll_func)(void), int level);
- extern void c4_new_game(int width, int height, int num);
- extern Boolean c4_make_move(int player, int column, int *row);
- extern Boolean c4_auto_move(int player, int level, int *column, int *row);
- extern char ** c4_board(void);
- extern int c4_score_of_player(int player);
- extern Boolean c4_is_winner(int player);
- extern Boolean c4_is_tie(void);
- extern void c4_win_coords(int *x1, int *y1, int *x2, int *y2);
- extern void c4_end_game(void);
- extern void c4_reset(void);
-
- #endif /* C4_DEFINED */
-