#pragma once

#include <list>
using std::list;
#include <string>
using std::string;

class Block;
class OGLrendrer;
class Character;
class Game;


class Level
{
public:
	Level(void);
	~Level(void);
	void draw(OGLrendrer *ogl);

	Block *getBlock(int x_, int y_);
	void removeBlock(Block *a);
	void triggerExplosive(int x, int y);
	Character *getCharacter();
	void setCharacter(Character *a);
	void setGame(Game *a);
	void removeBomb();
	void completeLevel();

	void loadFromString(string &a);
	unsigned int loadBlockFromString(string &a, unsigned int index);
	unsigned int loadDecorations(string &a, unsigned int index, Block *nBlock);
	unsigned int loadBomb(string &a, unsigned int index, Block *nBlock);
private:
	list<Block*> blockStore;
	Character *associatedCharacter;
	unsigned int bombsLeft;
	Game *associatedGame;
	int startingX, startingY;
};

