Fixes for datatype size on amd64.
[crack-attack.git] / src / ActionRecorder.h
bloba9742c8e3b2cb3e05cd1f16dba53e1b3bc87f465
1 /*
2 * ActionRecorder.h
3 *
4 * Crack Attack! is the legal property of its developers, whose names
5 * are too numerous to list here. Please refer to the COPYRIGHT file
6 * distributed with this source distribution for a full listing.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 #ifndef ACTIONRECORDER_H
24 #define ACTIONRECORDER_H
26 #include "Game.h"
27 #include "Controller.h"
29 #define GC_REPLAY_FILE_NAME "replay"
31 class Action {
32 public:
33 int name;
34 int time_step;
36 Action(): name(0), time_step(0) {}
37 Action(int n, int ts): name(n), time_step(ts) {}
40 /* static */ class ActionRecorder {
41 public:
42 static inline void initialize ( )
44 actions.clear();
47 static inline void addAction ( int state )
49 Action a(state, Game::time_step);
50 actions.push_back(a);
53 static void gameFinish ( );
55 private:
56 static std::vector<Action> actions;
59 #endif