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 / ChangeFieldsCo < prev    next >
Text File  |  1992-02-27  |  2KB  |  60 lines

  1. // This may look like C code, but it is really -*- C++ -*-
  2.  
  3. //   Module      : ChangeFieldsCommand.h   Version 1.2
  4. //   LastSCCS    : 2/26/92  16:38:46
  5. //   LastEdit    : "Tue Feb 25 10:32:47 1992"
  6. //   Description : 
  7. //   Author      : 
  8. //   Copyright   : GMD Schloss Birlinghoven
  9.  
  10. #ifndef Changefieldscommand_h
  11. #define Changefieldscommand_h
  12.  
  13. class ChangeFieldsCommand : public SleuthCommand {
  14.     META_DEF_1(ChangeFieldsCommand,SleuthCommand);
  15.   public:
  16.     ChangeFieldsCommand(SleuthDocument *p_document);
  17.     ChangeFieldsCommand(SleuthDocument *p_document, Player *p_player,
  18.             int p_shape, int p_color, int p_value, int p_how_many);
  19.   public:
  20.     int GetShape()
  21.     { return shape; }
  22.     int GetValue()
  23.     { return value; }
  24.     int GetColor()
  25.     { return color; }
  26.     int HowMany()
  27.     { return how_many; }
  28.     Player *GetPlayer()
  29.     { return player; }
  30.   protected:
  31.     virtual char *name()
  32.     { return("Change some fields"); };
  33.     virtual void doit();
  34.     virtual void undoit();
  35.     virtual void redoit();
  36.     virtual Boolean IsStorable();
  37.     virtual Boolean WriteToStream(ostream &p_ostr);
  38.     virtual Boolean ReadFromStream(istream &p_istr);
  39.   protected:
  40.     void ShapeSelect();
  41.     void ColorSelect();
  42.     void ValueSelect();
  43.     void ShapeColorSelect();
  44.     void ShapeValueSelect();
  45.     void ColorValueSelect();
  46.     void FieldSelect();
  47.     void FieldMark();
  48.   protected:
  49.     Player    *player;
  50.     int        shape;
  51.     int        color;
  52.     int        value;
  53.     int        how_many;
  54.     FieldList  marked_fields;
  55.     FieldList  owned_fields;
  56.     AxiomList  new_axioms;
  57. };
  58.  
  59. #endif
  60.