Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

level_generator.h

00001 /*
00002  *   EasySok --- A(nother) sokoban game for KDE.
00003  *
00004  *   Copyright (C) 2001 by Ralf Schmelter (ralfs@pc2a.chemie.uni-dortmund.de).
00005  *
00006  *   This program is free software; you can redistribute it and/or modify
00007  *   it under the terms of the GNU General Public License version 2 as
00008  *   published by the Free Software Foundation.
00009  *
00010  *   This program is distributed in the hope that it will be useful,
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *   GNU General Public License for more details.
00014  *
00015  *   You should have received a copy of the GNU General Public License
00016  *   along with this program; if not, write to the Free Software
00017  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018  */
00019 
00020 
00021 #ifndef EASYSOK_LEVEL_GENERATOR_INC_GUARD_H
00022 #define EASYSOK_LEVEL_GENERATOR_INC_GUARD_H
00023 
00024 
00025 #include <vector>
00026 
00027 #include "map.h"
00028 
00029 
00030 
00031 
00039 class LevelGenerator
00040 {
00041 public:
00042 
00052     static Map createEmptyMap(int width, int height, double fill);
00053 
00054 
00064     static Map createGoals(Map const & map, int goals);
00065 
00066 
00075     static Map createGems(Map const & map);
00076 
00077 
00088     static Movements createSolution(Map const & init_map, int pushes, int max_effort, Map & result_map);
00089 
00090 
00091 private:
00092 
00097     static void init();
00098 
00099 
00106     static void removeGems(Map & map);
00107 
00108 
00113     static bool s_was_initialized;
00114 
00115 
00120     static std::vector<int> s_empty_pattern_lengths;
00121 
00122 
00127     static std::vector<int> s_empty_pattern_offsets;
00128 
00129 
00134     static std::vector<int> s_x_empty_patterns;
00135 
00136 
00141     static std::vector<int> s_y_empty_patterns;
00142 };
00143 
00144 #endif

Generated at Sun Jan 6 18:49:09 2002 for EasySok by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001