home *** CD-ROM | disk | FTP | other *** search
/ Ragnaroek / Ragnaroek.img / OpponentApp / Balder.h < prev    next >
Text File  |  1991-12-09  |  2KB  |  55 lines

  1. #import <mach.h>
  2. #import <appkit/Application.h>
  3. #import "GameState.h"
  4.  
  5. @interface Balder:Application
  6. {
  7.     
  8.     id    statusText;                /* the status TextField */
  9.      BOOL    connected;                /* are we currently connected? */
  10.      id    opponentName;            /* our opponent's name */
  11.      id    opponentFace;            /* our opponent's face */
  12.      id    publicListener;        /* an InvitationListener */
  13.      id    privateListener;        /* a RagnarokListener for game information */
  14.      id    privateSpeaker;        /* a RagnarokSpeaker for talking to Ragnarok */
  15.      GameState *currentState;    /* the current game state */
  16.      int    ourSide;                    /* which side we're playing (BLACK or WHITE) */
  17. }
  18.  
  19. - appDidInit:sender;
  20. - appWillTerminate:sender;
  21.  
  22. // messages from our publicListener
  23. - (int)invitationFrom:(char *)username onHost:(char *)hostname RSVP:(port_t )rsvpPort Face:(char *)face length:(int)length;
  24. - (int)Game:(char *)game length:(int)length Side:(int)side YourPort:(port_t *)yourPort MyPort:(port_t )myPort MyFace:(char *)myFaceData length:(int)mflen From:(char *)username onHost:(char *)hostname;
  25.  
  26. // messages from our privateListener
  27. - (int)submitMoveFrom:(int)from To:(int)to;
  28. - (int)submitTentativeMoveFrom:(int)from To:(int)to;
  29. - (int)submitNoTentativeMove;
  30. - (int)submitUndos:(int)howMany;
  31. - (int)submitResetGame;
  32. - (int)submitMessage:(char *)aString;
  33. - (int)goodbye;
  34. - (int)pleaseAllow:(int)tag Undo:(int)howMany;
  35. - (int)pleaseAllow:(int)tag StartOver:(int)ignored;
  36. - (int)pleaseHurryUp:(int)tag;
  37. - (int)allow:(int)tag;
  38. - (int)refuse:(int)tag;
  39. - (int)ok:(int)tag;
  40.  
  41. // if we're disconnected
  42. - disconnect;
  43.  
  44. // reading and writing images with TIFF reps to buffers
  45. - (char *)writeImageToBuf:theImage length:(int *)length;
  46. - readImageFromBuf:(const char *)theBuf length:(int)length;
  47.  
  48. // announcing our decision
  49. - doMove:(struct move)theMove;
  50.  
  51. // deciding what to do
  52. - decide:sender;
  53.  
  54. @end
  55.