ResourcePlacement Class Reference

Author:
Kevin Hirschmann Fills a map with resources using the diamond-square algorithm
More...

#include <resourceplacement.h>

List of all members.

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


Detailed Description

Author:
Kevin Hirschmann Fills a map with resources using the diamond-square algorithm

Definition at line 33 of file resourceplacement.h.


Constructor & Destructor Documentation

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

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 (  ) 

Destructor.

Definition at line 47 of file resourceplacement.cpp.


Member Function Documentation

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().


Member Data Documentation

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().


The documentation for this class was generated from the following files:
Generated on Mon May 21 01:47:23 2012 for Advanced Strategic Command by  doxygen 1.5.1