home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C ++ / Applications / Lotto / lotto_calc_class.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-03-17  |  1.8 KB  |  88 lines  |  [TEXT/CWIE]

  1.  
  2. #define MAX_PAIRS 5000
  3. #define MAX_GEN 10
  4.  
  5. #include "lotto_data_class.h"
  6.  
  7. typedef struct pair {
  8.     int PAIR_1;
  9.     int PAIR_2;
  10.     int pair_count;
  11.     bool used;
  12. } a_pair;
  13.  
  14. typedef struct calc_data {
  15.     int set[6];
  16.     int protect[6];
  17.     int distrib[6];
  18.     int reds;
  19.     int whites;
  20.     int blues;
  21.     int evens;
  22.     int odds;
  23. } calc_array;
  24.  
  25. typedef struct set1 {
  26.     int the_set[6];
  27. } a_set;
  28.  
  29. class lotto_calc : public lotto_data {
  30.  
  31.    friend bool read_file( void );
  32.    friend void clear_records( void );
  33.    friend bool update_struct_file( void );
  34.    friend bool edit_struct_file( void );
  35.    friend void simple_save( void );
  36.     
  37.     public:
  38.         
  39.         a_set *p_set;
  40.         int TEST_1;
  41.         int TEST_2;
  42.         a_pair *thePair[MAX_PAIRS];
  43.         calc_array *array10[MAX_GEN];
  44.         int num_of_pairs;
  45.         int ten_hot_pairs[10][3];
  46.         int zeros[52];
  47.         int the_user_request;
  48.         int last_hot_pair;
  49.  
  50.         bool make_numbers( int );
  51.         bool predict_set( void );
  52.         
  53.         
  54.     private:
  55.         
  56.         int get_rollover( void );
  57.         void check_missing_numbers( int );
  58.         bool verify_sets( int );
  59.         bool check_if_valid_sets( int );
  60.         void clear_stats( int );
  61.         void reset_last_hot_pair( int );
  62.         void clear_array10( int );
  63.         bool check_against_database( int );
  64.         bool is_funky( int );
  65.         void get_hot_pairs( void );
  66.         bool record_pair( int, int, int );
  67.         void bubble_sort_pairs( void );
  68.         void get_ten_best_pairs( void );
  69.         bool get_zero_dists( void );
  70.         void delete_pair_structs( void );
  71.         void bubble_sort_sets( int );
  72.         int  pick_zero_dist( void );
  73.         bool check_if_good_num( int, int );
  74.         bool check_if_good_set( int, int );
  75.         bool get_a_hot_pair( int );
  76.         void get_calc_stats( int );
  77.         bool is_red( int );
  78.         bool is_white( int );
  79.         bool is_blue( int );
  80.         bool is_odd( int );
  81.         bool is_even( int );
  82.         bool check_matrix( int );
  83.         bool recheck_sets( int );
  84.         bool check_for_too_many( int );
  85.         bool check_last_two_lows( void );
  86. };
  87.  
  88.