Virtual U.org
Get Personal Training on VU Today
    
Top shadow
 
 register/help
User Name:

Password:

Oathleti.h Source File
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

Oathleti.h

Go to the documentation of this file.
00001 //Filename    : OATHLETI.H
00002 //Description : Athletics Office Class Declaration
00003 //Owner           : Kevin(ho)
00004 
00005 #ifndef __OATHLETICS_H
00006 #define __OATHLETICS_H
00007 
00008 //##### begin fred 981024 #####//
00009 #include <GAMEDEF.H>
00010 
00011 //----------- Define constants -------------//
00012 
00013 enum {
00014     NCAA_LEVEL_COUNT = 3,
00015 };
00016 
00017 enum {
00018     ATHLETICS_DIVISION_3 = 0,
00019     ATHLETICS_DIVISION_2,
00020     ATHLETICS_DIVISION_1
00021 };
00022 
00023 //----------- Define class AdmOffice --------------//
00024 //
00029 class Athletics {
00030 public:
00031     Athletics();
00032     ~Athletics();
00033     void init();
00034     void deinit();
00035     void report(int);
00036     int detect();
00037     int detect2();
00038 
00039     char current_mode;
00040 
00041     //##### begin fred 981021 #####//
00042     int     write_file(File* filePtr);
00043     int     read_file(File* filePtr);
00044 
00045     //----- vars and methods related to simulation and statistics
00046 public:
00047     // player interface related
00048     //### begin zhoubin 02/25/99
00049     float spinner_var1;
00050     //### end zhoubin 02/25/99
00051     int ncaa_level_input;                         // INPUT_LOW (div3), INPUT_MID (div2), INPUT_HIGH (div1)
00052     float ncaa_level_value;                       //## 990510   // High:   value = 1.5; Medium: value = 3; Low:    value = 4.5
00053     int last_ncaa_level_input;
00054 
00055     int football_graph[HISTORY_YEAR_COUNT2];      // use int since class GraphA don't accept char array
00056     int basketball_graph[HISTORY_YEAR_COUNT2];
00057 #if(GAME_VERSION>=200)
00058     int initial_football_graph[2];                // [0] inital of football_graph[0] and 1 for football_graph[HISTORY_YEAR_COUNT]
00059     int initial_basketball_graph[2];              // [0] inital of basketball_graph[0] and 1 for basketball_graph[HISTORY_YEAR_COUNT]
00060 #endif
00061 
00062     float history_value[HISTORY_YEAR_COUNT2];
00063 
00064     //----- intermediate vars -----//
00065 public:
00066     int total_game;
00067     int total_football_game;
00068     int total_basketball_game;
00069     float avg_percent_win;                        // 0.30 => 30%
00070     float football_percent_win;
00071     float basketball_percent_win;
00072 
00073 private:
00074     int init_expense;
00075     int init_top_male_matrics;
00076     int init_top_female_matrics;
00077     char  init_ability_male_matrics;
00078     char  init_ability_female_matrics;
00079     float init_win_prob;
00080 
00081     float revenue_multiplier;
00082 
00083     char  fraction_intercollege_cost;
00084     int total_cost_norm;
00085 
00086 public:
00087     // for welcome letter
00088     float football_probability_win;               // =[0.0, 1.0]
00089     float basketball_probability_win;
00090 
00091     int football_game_count[NCAA_LEVEL_COUNT];
00092     int basketball_game_count[NCAA_LEVEL_COUNT];
00093 
00094 public:
00095     void  init_data_pre_finance();
00096     void  init_data();
00097     void  next_day();
00098     void  input_2_ncaa_level(int newNcaaLevel);
00099     void  calc_adjusted_revenue_expense(int &revenue, int &expense);
00100 #if(GAME_VERSION>=200)
00101     void  save_initial_data();
00102 #endif
00103 
00104 private:
00105     void  update_win_lost(bool isFootballGame);
00106     void  update_history(char update_flag);
00107     void  calc_probability_win();
00108     void  update_history_sub();
00109 
00110     //##### end fred 981021 #####//
00111 };
00112 
00113 extern Athletics athletics_office;
00114 
00115 //-------------------------------------------------//
00116 #endif

Generated on Fri Aug 23 01:37:13 2002 for VirtualU by doxygen1.2.17