home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / games / volume15 / reversi2 / part02 / count.c < prev    next >
Text File  |  1993-01-27  |  255b  |  20 lines

  1. /*
  2.  *    count.c
  3.  *
  4.  *    count up the board
  5.  */
  6.  
  7. # include    "reversi.h"
  8.  
  9. count (player, board)
  10. boardT    board;
  11. {
  12.     register int    x, y, count;
  13.  
  14.     count = 0;
  15.     for (x = 1; x <= SIZE; x++)
  16.         for (y = 1; y <= SIZE; y++)
  17.             count += board[x][y];
  18.     return count * player;
  19. }
  20.