|
Jadex 0.96 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjadex.examples.hunterprey.WorldObjectData
jadex.examples.hunterprey.WorldObject
jadex.examples.hunterprey.CreatureData
jadex.examples.hunterprey.Creature
public abstract class Creature
Editable Java class for concept Creature of hunterprey ontology.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface nuggets.INugget |
---|
nuggets.INugget.Helper |
Field Summary | |
---|---|
static String[] |
alldirs
All possible directions. |
Constructor Summary | |
---|---|
Creature()
Create a new Creature. |
Method Summary | |
---|---|
Object |
clone()
Clone the creature. |
Location |
createLocation(Location loc,
String dir)
Create a location. |
Location |
createLocation(String dir)
Create a location. |
boolean |
equals(Object o)
Test if two creatures are equal. |
String[] |
getDirections(Location a,
Location b)
Get the directions between two locations. |
String[] |
getDirections(WorldObject a)
Get the directions between me and an object. |
String[] |
getDirections(WorldObject a,
WorldObject b)
Get the directions between two objects. |
int |
getDistance(Location a,
Location b)
Get the distance between two locations. |
int |
getDistance(WorldObject a)
Get the distance between me and an object. |
int |
getDistance(WorldObject a,
WorldObject b)
Get the distance between two objects |
WorldObject |
getObject(Location loc,
WorldObject[] objects)
Get a world object at a specified location. |
String[] |
getPossibleDirections(WorldObject[] objects)
Get all possible directions to move. |
int |
hashCode()
Get the hash code of the creature. |
boolean |
isInVisionRange(Location a)
Test if a location is in my vision range. |
boolean |
isNear(Location a,
Location b,
int range)
Test if two locations are near Range is in all direction (including diagonals). |
void |
sortByDistance(WorldObject[] objects)
Sort objects by distance. |
void |
sortByDistance(WorldObject[] objects,
Location loc)
Sort objects by distance. |
Methods inherited from class jadex.examples.hunterprey.CreatureData |
---|
_persist, _set, getAge, getAID, getLeaseticks, getName, getPoints, getVisionRange, getWorldHeight, getWorldWidth, setAge, setAID, setLeaseticks, setName, setPoints, setVisionRange, setWorldHeight, setWorldWidth, toString |
Methods inherited from class jadex.examples.hunterprey.WorldObjectData |
---|
getLocation, setLocation |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String[] alldirs
Constructor Detail |
---|
public Creature()
Method Detail |
---|
public boolean equals(Object o)
equals
in class WorldObject
public int hashCode()
hashCode
in class WorldObject
public Object clone()
clone
in class Object
public Location createLocation(String dir)
dir
- The direction.
public Location createLocation(Location loc, String dir)
loc
- The location.dir
- The direction.
public int getDistance(WorldObject a)
public int getDistance(WorldObject a, WorldObject b)
public int getDistance(Location a, Location b)
public boolean isNear(Location a, Location b, int range)
public boolean isInVisionRange(Location a)
public String[] getDirections(WorldObject a)
public String[] getDirections(WorldObject a, WorldObject b)
public String[] getDirections(Location a, Location b)
public void sortByDistance(WorldObject[] objects)
public void sortByDistance(WorldObject[] objects, Location loc)
public WorldObject getObject(Location loc, WorldObject[] objects)
loc
- The location.
public String[] getPossibleDirections(WorldObject[] objects)
objects
- The objects near.
|
Jadex 0.96 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (C) 2002-2007 Lars Braubach, Alexander Pokahr - University of Hamburg. Use is subject to license terms.