org.globalse.arena.sword.algorithm
Class Landscape

java.lang.Object
  |
  +--org.globalse.arena.frag.objects.FRAGObject
        |
        +--org.globalse.arena.sword.algorithm.Landscape

public class Landscape
extends FRAGObject

A Landscape object contains the attributes, that determine the characteristics of a world.

See Also:
Serialized Form

Fields inherited from class org.globalse.arena.frag.objects.FRAGObject
controller, gameName, influenceRange, objectName, owner, position, visibilityRange
 
Constructor Summary
Landscape()
           
 
Method Summary
 void actionEvent(ObjectActionEvent event)
           
 MathVector checkCollision(java.lang.String other, MathVector oldPos, MathVector delta)
           
 double getAmountOfWater()
          Returns, how much water a landscape contains on average.
 double getRoughness()
          Returns, how rough a landscape is.
 long getSeed()
           
 void init(java.lang.String name, double amountOfWater, double roughness, long seed, java.lang.String gameName)
          The constructor crates a new landscape object.
 
Methods inherited from class org.globalse.arena.frag.objects.FRAGObject
checkAndResetMark, checkMark, clone, controlAcquired, controlLost, draw, getGameManager, getInfluenceRange, getObjectManager, getObjectName, getPosition, killed, mark, newerVersion, setInfluenceRange, setPosition
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Landscape

public Landscape()
Method Detail

init

public void init(java.lang.String name,
                 double amountOfWater,
                 double roughness,
                 long seed,
                 java.lang.String gameName)
The constructor crates a new landscape object.
Parameters:
name - the type of the landscape that should be created.
amountOfWater - a double number between 0.0 and and 1.0 that represents the percentage of water in the world.
roughness - a number between 0.0 and 1.0 to represent the roughness of the landscape
seed - the seed for the random number generator
gameName - the FRAG-gamename

getSeed

public long getSeed()

getRoughness

public double getRoughness()
Returns, how rough a landscape is.
Returns:
the roughness

getAmountOfWater

public double getAmountOfWater()
Returns, how much water a landscape contains on average.
Returns:
the average amount of water

actionEvent

public void actionEvent(ObjectActionEvent event)
Overrides:
actionEvent in class FRAGObject

checkCollision

public MathVector checkCollision(java.lang.String other,
                                 MathVector oldPos,
                                 MathVector delta)
Overrides:
checkCollision in class FRAGObject



This page is hosted by the Chair for Applied Software Engineering of the Technische Universität München.
Imprint (Impressum)