Hogy-Bear

disknplahy.h

Apr 9th, 2018
233
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.77 KB | None | 0 0
  1. #ifndef DISKAANDPLAYERS_H_
  2. #define DISKAANDPLAYERS_H_
  3.  
  4. #define SIZE 8
  5.  
  6. enum colour{
  7.     WHITE,
  8.     BLACK,
  9.     NONE
  10. };
  11.  
  12. typedef struct position{
  13.     int row;
  14.     int col;
  15. } position;
  16.  
  17. typedef struct disk{
  18.     enum colour type;
  19.     position pos;
  20. } disk;
  21.  
  22. typedef struct player{
  23.     char name[20];
  24.     enum colour type;
  25.     int points;
  26. } player;
  27.  
  28. void initializePlayers(player *player1, player *player2);
  29.  
  30. void initializeBoard(disk board[SIZE][SIZE]);
  31.  
  32. void printBoard(disk board [SIZE][SIZE]);
  33.  
  34. void flipDisksWhite(disk cur_disk, disk board[SIZE][SIZE], disk arr[], int disk_arr_len, int *cur_score, int *opp_score);
  35.  
  36. void flipDisksBlack(disk cur_disk, disk board[SIZE][SIZE], disk arr[], int disk_arr_len, int *cur_score, int *opp_score);
  37.  
  38. #endif
Advertisement
Comments
  • User was banned
Add Comment
Please, Sign In to add comment