1 /*
2  * ComboTabulator.h
3  * Daniel Nelson - 8/24/0
4  *
5  * Copyright (C) 2000  Daniel Nelson
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
20  *
21  * Daniel Nelson - aluminumangel.org
22  * 174 W. 18th Ave.
23  * Columbus, OH  43210
24  */
25 
26 #ifndef COMBOTABULATOR_H
27 #define COMBOTABULATOR_H
28 
29 using namespace std;
30 
31 #include "Game.h"
32 
33 class Block;
34 
35 class ComboTabulator {
36 public:
37   void initialize (   );
38 
39   void reportElimination ( int _magnitude, Block &kernel );
40 
incrementInvolvement()41   inline void incrementInvolvement (   )
42     { ++involvement_count; }
decrementInvolvement()43   inline void decrementInvolvement (   )
44     { --involvement_count; }
45 
46   // free store id
47   int id;
48 
49   // latest elimination time stamp
50   int time_stamp;
51 
52   // creation time stamp
53   int creation_time_stamp;
54 
55   // number of blocks involved in combo
56   int involvement_count;
57 
58   // normal elimination magnitude
59   int magnitude;
60 
61   // special elimination magnitude
62   int special_magnitude;
63 
64   // combo multiplier
65   int multiplier;
66 
67   // number of multipliers this time step
68   int n_multipliers_this_step;
69 
70   // base score earned so far on this multiplier
71   int base_accumulated_score;
72 
73   // base score earned so far on this turn
74   int base_score_this_step;
75 
76   // used by blocks the step after elimination to determine spark number
77   int latest_magnitude;
78 
79   // keep track of the location of the eliminations
80   int x, y;
81 
82   // keeps track of the various special blocks which have been eliminated
83   int special[BF_NUMBER_SPECIAL];
84 };
85 
86 #endif
87