0ad/source/tools/rmgen/simplegroup.h

36 lines
885 B
C
Raw Normal View History

2005-07-30 23:07:02 +02:00
#ifndef __SIMPLEGROUP_H__
#define __SIMPLEGROUP_H__
#include "objectgroupplacer.h"
#include "tileclass.h"
2005-07-30 23:07:02 +02:00
class SimpleGroup : public ObjectGroupPlacer
{
public:
class Element {
public:
std::string type;
int minCount, maxCount;
float minDistance, maxDistance;
2005-07-30 23:07:02 +02:00
Element::Element();
Element::Element(const std::string& type, int minCount, int maxCount,
float minDistance, float maxDistance);
2005-07-30 23:07:02 +02:00
Element::~Element();
bool place(int cx, int cy, class Map* m, int player, bool avoidSelf,
Constraint* constr, std::vector<Object*>& ret);
2005-07-30 23:07:02 +02:00
};
std::vector<Element*> elements;
bool avoidSelf;
2005-07-30 23:07:02 +02:00
int x, y;
TileClass* tileClass;
2005-07-30 23:07:02 +02:00
virtual bool place(class Map* m, int player, Constraint* constr);
2005-07-30 23:07:02 +02:00
SimpleGroup(std::vector<Element*>& elements, TileClass* tileClass, bool avoidSelf, int x, int y);
2005-07-30 23:07:02 +02:00
virtual ~SimpleGroup(void);
};
#endif