Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

score.h

Go to the documentation of this file.
00001 /* Definitions relating to scorekeepers in Xconq.
00002    Copyright (C) 1987-1989, 1991-1997, 1999 Stanley T. Shebs.
00003 
00004 Xconq is free software; you can redistribute it and/or modify
00005 it under the terms of the GNU General Public License as published by
00006 the Free Software Foundation; either version 2, or (at your option)
00007 any later version.  See the file COPYING.  */
00008 
00014 typedef struct a_scorekeeper {
00015     short id;                   
00016     char *title;                
00017     Obj *when;                  
00018     Obj *who;                   
00019     SideMask whomask;           
00020     Obj *knownto;               
00021     SideMask knowntomask;       
00022     short keepscore;            
00023     int initial;                
00024     Obj *trigger;               
00025     short triggered;            
00026     Obj *body;                  
00027     Obj *record;                
00028     Obj *notes;                 
00029     short scorenum;             
00030     struct a_scorekeeper *next; 
00031 } Scorekeeper;
00032 
00038 #define for_all_scorekeepers(sk)  \
00039   for ((sk) = scorekeepers;  (sk) != NULL;  (sk) = (sk)->next)
00040 
00041 #ifdef DESIGNERS
00042 #define keeping_score() (numscorekeepers > 0 && numdesigners == 0)
00043 #else
00044 #define keeping_score() (numscorekeepers > 0)
00045 #endif
00046 
00047 #define recording_scores() (0)
00048 
00050 extern Scorekeeper *scorekeepers;
00051 
00053 extern int numscorekeepers;
00054 
00056 extern int numscores;
00057 
00059 extern int any_post_action_scores;
00061 extern int any_post_event_scores;
00062 
00063 extern void init_scorekeepers(void);
00064 extern Scorekeeper *create_scorekeeper(void);
00065 extern Scorekeeper *find_scorekeeper(int id);
00066 extern void init_scores(void);
00067 extern void check_pre_turn_scores(void);
00068 extern void check_post_turn_scores(void);
00069 extern void check_post_action_scores(void);
00070 extern void check_post_event_scores(void);
00071 extern void run_scorekeeper(Side *side, Scorekeeper *sk);
00072 extern Obj *eval_sk_form(Side *side, Scorekeeper *sk, Obj *form);
00073 #if (0)
00074 extern int sum_property(Side *side, Obj *form);
00075 #else
00076 extern Obj *sum_uprop(Side *side, Obj *form);
00077 #endif
00078 extern int point_value(Unit *unit);
00079 extern int side_point_value(Side *side);
00080 extern int alliance_point_value(Side *side);
00081 extern int has_allies(Side *side);
00082 extern Obj *eval_sk_test(Side *side, Scorekeeper *sk, Obj *form);
00083 extern void side_wins(Side *side, int why);
00084 extern void side_loses(Side *side, Side *side2, int why);
00085 extern void all_sides_draw(void);
00086 extern void record_into_scorefile(void);
00087 extern char *get_scores(Side *side);
00088 

Generated on Sat Sep 17 10:28:53 2005 for XconqKernel by doxygen 1.3.6