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
/
SleuthDocument
< prev
next >
Wrap
Text File
|
1992-02-27
|
3KB
|
99 lines
// This may look like C code, but it is really -*- C++ -*-
// Module : SleuthDocument.h Version 1.2
// LastSCCS : 2/26/92 16:39:09
// LastEdit : "Tue Feb 25 10:32:51 1992"
// Description :
// Author :
// Copyright : GMD Schloss Birlinghoven
#ifndef Sleuthdocument_h
#define Sleuthdocument_h
enum FieldStatus { eNeutral = 0, eOwned = 1, eNotOwned = 2 };
class Player;
class PlayerView;
class CardView;
class ZatDialog;
class ZatParameterDialog;
DefGenericListWithIterator(CardViewList,CardView,CardViewListIterator);
class SleuthDocument : public GnDocument {
public:
SleuthDocument();
virtual void create_windows(int new_width = 0, int new_height = 0);
//virtual void wipe_out();
public:
void DisplayOwner(Card *c);
void AddCardView(CardView *card_view);
Boolean IsRegistered(CardView *card_view);
void SetGameName(char *new_game_name, Boolean copy = True);
char *GetGameName();
void SetParticipant(char *new_name, Boolean copy = True);
char *GetParticipant();
Card *GetCard(int shape, int color, int value)
{ return cards[shape][color][value]; }
int LastRound();
int NextRound();
int PreviousRound();
int GetRound();
ZatParameterDialog *GetZatParameterDialog();
int GetNumberGroupValue();
protected:
// Document IO
virtual Boolean SaveHistory();
virtual Boolean write_to_stream(ostream &stream);
virtual Boolean read_from_stream(istream &stream);
virtual GnCommand *MakeNewCommand(char *p_command_class_name);
protected:
// Callbacks
void PrintTables(caddr_t);
void PrintAxioms(caddr_t);
void NewRound(caddr_t);
protected:
void AdjustListWidgets();
public:
static char *PlayerName(int i)
{ return player_names[i]; }
static char *ColorName(int i)
{ return color_names[i]; }
static char *ShapeName(int i)
{ return shape_names[i]; }
static char *ValueName(int i)
{ return value_names[i]; }
Player *GetPlayer(int nth);
int CalculateSelectionListWidth();
public:
void SelectPlayer(Player *player);
Player *SelectedPlayer()
{ return selected_player; }
protected:
Player *players[7];
Player *selected_player;
char *game_name;
char *participant;
int round_number;
Card *cards[3][4][3];
protected:
CardViewList observer;
GnRadioGroup player_group;
GnRadioGroup shape_group;
GnRadioGroup color_group;
GnRadioGroup value_group;
GnRadioGroup number_group;
GnPushButton enter_rule_button;
CardView *card_view;
ZatDialog *zat_dialog;
ZatParameterDialog *zat_parameter_dialog;
GnMenuEntry *new_round_entry;
private:
static char *player_names[7];
static char *color_names[5];
static char *shape_names[4];
static char *value_names[4];
};
#endif