// $Id: playmodel.h,v 1.6 2006/08/07 17:24:48 matthew Exp $ // Fish Supper // Copyright (C) 2006 Matthew Clarke // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA // 02111-1307, USA. #ifndef _PLAY_MODEL_H_ #define _PLAY_MODEL_H_ #include "mapengine.h" #include "spritemanager.h" #include "playerdata.h" #include #include #include #include #include "enums.h" #include "playdisplay.h" #include "soundengine.h" #include "constants.h" #include namespace FS { class PlayModel { private: MapEngine my_map_engine; SpriteManager my_sprite_mngr; PlayerData my_player_data; int start_time; void load_level(int lev); int num_starting_crystals; // FIXME: need a symbolic constant! CrystalColor starting_crystals[5]; public: PlayModel(); ~PlayModel(); void init_sprite_manager(PlayDisplay * pd, SoundEngine * se); void new_game(int start_level = 1); void new_level(int st); PlayReport update(int gt, KeyboardEvent * events, int n, bool running); int get_level() const { return my_player_data.get_level(); } int get_score() const { return my_player_data.get_score(); } }; // class PlayModel } // namespace FS #endif