Jadex 0.96

jadex.examples.hunterprey.creature.hunters.ldahunter.potentialfield
Class FieldModel

java.lang.Object
  extended by jadex.examples.hunterprey.creature.hunters.ldahunter.potentialfield.FieldModel

public final class FieldModel
extends Object


Field Summary
 boolean[][] obstacles
          obstacles obstacle in field model
 int[][] visits
          visits
 
Constructor Summary
FieldModel(int w, int h)
          Constructor: FieldModel.
 
Method Summary
 void calcDistance(int mx, int my)
           
 void clearDistance()
          clears the first buffer
 void clearRange(int x, int y, int r, int round)
           
 boolean getNearerLocation(Location loc)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

obstacles

public final boolean[][] obstacles
obstacles obstacle in field model


visits

public final int[][] visits
visits

Constructor Detail

FieldModel

public FieldModel(int w,
                  int h)
Constructor: FieldModel.

Parameters:
w - width
h - height
Method Detail

getNearerLocation

public final boolean getNearerLocation(Location loc)
Parameters:
loc - the location the values should be stored to (in, out)
Returns:
false if this location has distance <= 0, true if location changed

calcDistance

public void calcDistance(int mx,
                         int my)
Parameters:
mx - - from x
my - - from y

clearDistance

public void clearDistance()
clears the first buffer


clearRange

public void clearRange(int x,
                       int y,
                       int r,
                       int round)
Parameters:
x -
y -
r -
round -

Jadex 0.96

Submit a bug or feature
For further API reference and developer documentation, see the Jadex User Guide and the Jadex Tutorial. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, and working code examples.

Copyright (C) 2002-2007 Lars Braubach, Alexander Pokahr - University of Hamburg. Use is subject to license terms.