#include <resourceplacement.h>
Public Member Functions | |
| ResourcePlacement (GameMap &map, double fuelRoughness, double materialRoughness, unsigned short maxFuelOffSet, unsigned short maxMaterialOffSet, int additionalFreeFieldsPercFuel=0, int additionalFreeFieldsPercMaterial=0) | |
| Constructor. | |
| ~ResourcePlacement () | |
| Destructor. | |
| void | placeResources () |
| Fills the map with all resources. | |
| void | placeFuelResources () |
| Fills the map only with fuel resources. | |
| void | placeMaterialResources () |
| Fills the map only with material resources. | |
Static Public Attributes | |
| static const int | MAXFUELVALUE |
| static const int | MINFUELVALUE |
| static const int | MAXMATERIALVALUE |
| static const int | MINMATERIALVALUE |
Definition at line 33 of file resourceplacement.h.
| ResourcePlacement::ResourcePlacement | ( | GameMap & | map, | |
| double | fuelRoughness, | |||
| double | materialRoughness, | |||
| unsigned short | maxFuelOffSet, | |||
| unsigned short | maxMaterialOffSet, | |||
| int | additionalFreeFieldsPercFuel = 0, |
|||
| int | additionalFreeFieldsPercMaterial = 0 | |||
| ) |
Constructor.
Configures algorithm with algorithm determining parameters
| map | The map which is filled with resources | |
| fuelRoughness | Decides how large the offset (relative) for fuel between the fields may be. Value must be 0 < value < 4.0 The higher the value the more "hills" and "valleys" you get | |
| materialRoughness | Decides how large the offset (relative) for material between neighbouring fields may be. Value must be 0 < value < 4.0 The higher the value the more "hills" and "valleys" you get | |
| maxFuelOffSet | Determines the absolut offset fuelFields might have | |
| maxMaterialOffSet | Determines the absolut offset materialFields might have |
Definition at line 23 of file resourceplacement.cpp.
References GameMap::xsize, and GameMap::ysize.
| ResourcePlacement::~ResourcePlacement | ( | ) |
| void ResourcePlacement::placeResources | ( | ) |
Fills the map with all resources.
Definition at line 49 of file resourceplacement.cpp.
Referenced by ResourcePlacementDialog::buttonEvent().
| void ResourcePlacement::placeFuelResources | ( | ) |
Fills the map only with fuel resources.
Definition at line 55 of file resourceplacement.cpp.
Referenced by ResourcePlacementDialog::buttonEvent().
| void ResourcePlacement::placeMaterialResources | ( | ) |
Fills the map only with material resources.
Definition at line 61 of file resourceplacement.cpp.
Referenced by ResourcePlacementDialog::buttonEvent().
const int ResourcePlacement::MAXFUELVALUE [static] |
Definition at line 92 of file resourceplacement.h.
Referenced by ResourcePlacementDialog::ResourcePlacementDialog().
const int ResourcePlacement::MINFUELVALUE [static] |
Definition at line 93 of file resourceplacement.h.
Referenced by ResourcePlacementDialog::ResourcePlacementDialog().
const int ResourcePlacement::MAXMATERIALVALUE [static] |
Definition at line 94 of file resourceplacement.h.
Referenced by ResourcePlacementDialog::ResourcePlacementDialog().
const int ResourcePlacement::MINMATERIALVALUE [static] |
Definition at line 95 of file resourceplacement.h.
Referenced by ResourcePlacementDialog::ResourcePlacementDialog().
1.5.1