fork download
  1. /*
  2.  * checkers.h
  3.  *
  4.  Header file for Project 1
  5.  *
  6.  */
  7.  
  8. #include "stdio.h"
  9.  
  10. /* boolean constants */
  11. #define TRUE 1
  12. #define FALSE 0
  13.  
  14. /* check functions will return valid/invalid status of moves */
  15. #define VALID_MOVE 1
  16. #define INVALID_MOVE 2
  17.  
  18. /* each checker board square will encode its contents */
  19. #define EMPTY 0
  20. #define RED 1
  21. #define WHITE 2
  22. #define RED_KING 3
  23. #define WHITE_KING 4
  24.  
  25. #define BOARD_SIZE 8
  26. extern int the_board[BOARD_SIZE][BOARD_SIZE];
  27.  
  28. /* Required Functions */
  29. void print_board();
  30. int jump_exists(int color);
  31. void move_piece(int color, int x_from, int y_from, int x_to, int y_to, int jump);
  32. int check_move(int color, int x_from, int y_from, int x_to, int y_to, int jump);
  33. int check_jump(int x_from, int y_from, int x_to, int y_to, int dir);
  34. int check_step(int x_from, int y_from, int x_to, int y_to, int dir);
  35. int is_jumper(int x, int y);
  36.  
  37.  
  38. /*Added Variable and Constatns*/
  39. #define redTurn 93
  40. #define whiteTurn 91
  41.  
  42. int currentPlayer;
  43. int x_from, y_from, x_to, y_to;
  44.  
  45. /*Added functions*/
  46. int printPlayer();
  47. int checkBounds(int input1, int input2, int input3, int input4);
  48. int changePlayer();
  49. int checkDir();
  50. int checkPlayerPiece();
  51.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/../../../crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
collect2: ld returned 1 exit status
stdout
Standard output is empty