home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / games / volume4 / xgo / part04 / dohand.c < prev    next >
C/C++ Source or Header  |  1988-04-08  |  956b  |  50 lines

  1. /*
  2.  * $Header: dohand.c,v 1.4 88/02/19 13:47:54 hale Exp $
  3.  */
  4.  
  5. #include "go.h"
  6.  
  7. DoHand(x,y,c)
  8. int x,y,c;
  9. {
  10.     int p;
  11.  
  12.     if (b(x,y)!= 0)
  13.         sethand(x,y,(b(x,y)==c+1 ? 0:c+1));
  14.     else
  15.         putpiece(x,y,c,false);
  16.  
  17.     if (c) SetBlkCur();
  18.     else SetWhtCur();
  19. }
  20.  
  21. sethand(x,y,v)
  22. int x,y,v;
  23. {
  24.     if (b(x,y) != v) {
  25.         b(x,y)= v;
  26.         Plt(&board,x,y);
  27.         SEND(MHANDICAP);
  28.         SendCoord(x,y);
  29.         sendint(v);
  30.     }
  31. }
  32. /*
  33.  * $Log:    dohand.c,v $
  34.  * Revision 1.4  88/02/19  13:47:54  hale
  35.  * Added io changes for loading games.
  36.  * Load game is cleaned up.  Variable board
  37.  * sizes and formats available in save game
  38.  * as well as printed comments.
  39.  * 
  40.  * Revision 1.3  88/02/14  00:21:16  hale
  41.  * Added load file option during game to restore game to starting
  42.  * state.  Also, clear board operation.  Restoring game puts current
  43.  * player in sync.  With the demo mode, this is invaluable.
  44.  * 
  45.  * Revision 1.2  88/02/13  12:45:02  hale
  46.  * modified and maximized the handicap given to 9.
  47.  * 
  48.  */
  49.  
  50.