/***************************************************************************
 *   Copyright (C) 2004 by ian reinhart geiser                             *
 *   ian@geiseri.com                                                       *
 *                                                                         *
 *   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 CELL_H
#define CELL_H
#include "reference.h"
#include "monster.h"
#include "player.h"
#include "item.h"

class QPixmap;
class QBrush;

/**
A container for either a unit, item or wall object on the game board.

	@author ian reinhart geiser <ian@geiseri.com>
*/
class Cell{
public:
	enum TileType { NormalType, WaterType, PathType, WallType };
	enum CharType { EmptyType, ItemType, MonsterType, PlayerType };

	Cell();
	~Cell();

	void setPlayer (  Player * theValue );
	Player *player() const;
	void clearPlayer();

	void setItem ( Item *theValue );
	Item *item() const;
	void clearItem();

	void setMonster (  Monster *theValue );
 	Monster *monster() const;
	void clearMonster();

	QPixmap pixmap() const;
	QBrush background() const;

	TileType tileBackground() const;
	void setTileBackground ( const TileType& theValue );

	CharType tileForground() const;

	void setIsVisible( bool theValue );
	bool isVisible() const;

private:
	Player *m_player;
	Monster *m_monster;
	Item *m_item;
	TileType m_tileBackground;
	bool m_isVisible;
	bool m_explored;
};

#endif

