Rally X
ELEN3009 Project by Justin Wernick and David Schneider
|
00001 #ifndef MAZEREADER_H 00002 #define MAZEREADER_H 00003 00004 #include <vector> 00005 #include <list> 00006 #include <string> 00007 #include <fstream> 00008 using namespace std; 00009 00010 #include <allegro5/allegro_native_dialog.h> 00011 00012 #include "../logic/Maze.h" 00013 #include "../logic/PlayerCar.h" 00014 #include "../logic/EnemyCar.h" 00015 #include "../logic/Checkpoint.h" 00016 #include "../logic/Rock.h" 00017 00027 class FileOpenError{}; 00028 00035 class LevelReader 00036 { 00037 public: 00043 LevelReader(string filename); 00044 00045 //Assignment and copy operations are handled by the compiler generated versions 00046 00059 void readLevel(Maze& maze, list<PlayerCar>& players, list<EnemyCar>& enemies, list<Checkpoint>& checkpoints, list<Rock>& rocks); 00060 00061 private: 00062 static const char PLAYER_CHAR = '@'; 00063 static const char ENEMY_CHAR = 'X'; 00064 static const char CHECKPOINT_CHAR = 'P'; 00065 static const char ROCK_CHAR = 'O'; 00066 static const char WALL_CHAR = '#'; 00067 00068 string _filename; 00069 }; 00070 00071 #endif // MAZEREADER_H