home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / g / gina15.zip / demos / sleuth / Field.h < prev    next >
C/C++ Source or Header  |  1992-02-27  |  1KB  |  42 lines

  1. // This may look like C code, but it is really -*- C++ -*-
  2.  
  3. //   Module      : Field.h   Version 1.2
  4. //   LastSCCS    : 2/26/92  16:38:43
  5. //   LastEdit    : "Fri Nov  8 13:40:45 1991"
  6. //   Description : 
  7. //   Author      : 
  8. //   Copyright   : GMD Schloss Birlinghoven
  9.  
  10. #ifndef Field_h
  11. #define Field_h
  12.  
  13. class Player;
  14.  
  15. class Field : public PlayerLocation {
  16.     friend class Player;
  17.   protected:
  18.     Field(Player *p_player, Card *p_card,
  19.       int p_shape, int p_color, int p_value);
  20.     FieldStatus SetState(FieldStatus p_field_status);
  21.   public:
  22.     Card *GetCard()
  23.     { return card; }
  24.     FieldStatus GetState()
  25.     { return field_status; }
  26.     void Change(FieldStatus new_status);
  27.   public: // Predicates
  28.     Boolean IsNeutral()
  29.     { return field_status == eNeutral; }
  30.     Boolean IsOwned()
  31.     { return field_status == eOwned; }
  32.     Boolean IsNotOwned()
  33.     { return field_status == eNotOwned; }
  34.   private:
  35.     Card        *card;
  36.     FieldStatus  field_status;
  37. };
  38.  
  39. DefGenericListWithIterator(FieldList,Field,FieldListIterator);
  40.  
  41. #endif
  42.