Class Dragon
Class Dragon
java.lang.Object
|
+----Dragon
- public class Dragon
- extends Object
- Version:
- 1.0
Datatype for a dragon
- Author:
- Nicklas Hjalmarsson
-
Dragon()
- Default constructor
-
Dragon(String)
- Constructor to make a dragon from a form
do not use for creating new dragons
-
attack()
-
-
cost()
-
-
defence()
-
-
flee(City)
-
-
flee(Dragon)
-
-
flee(Fod)
- Use when a Dragon flees fom a battle to set his new Mission and destination
-
getArea(Area[][])
-
-
getDestination(Area[][])
-
-
getOwner()
-
-
incPcp(int)
-
-
incSpd(int)
-
-
incStr(int)
- use to correct eventual malformed values
-
incWea(int)
-
-
incWis(int)
-
-
main(String[])
-
-
movement()
-
-
setDestination(Area)
-
-
setOwner(int)
-
-
Toform()
- Use to get a form to pass through sockets from a dragon
-
toString()
- A nice function for debugging
-
tuneValues()
-
Dragon
public Dragon()
- Default constructor
Dragon
public Dragon(String str)
- Constructor to make a dragon from a form
do not use for creating new dragons
getArea
public Area getArea(Area Map[][])
getDestination
public Area getDestination(Area Map[][])
movement
public int movement()
attack
public int attack()
defence
public int defence()
flee
public boolean flee(Dragon d)
- Returns:
- s true if the Dragon does not dare to stay and fight
flee
public boolean flee(City c)
- Returns:
- s true if the Dragon does not dare to stay and fight against the city
flee
public void flee(Fod game)
- Use when a Dragon flees fom a battle to set his new Mission and destination
setDestination
public void setDestination(Area a)
incStr
public void incStr(int x)
- use to correct eventual malformed values
incSpd
public void incSpd(int x)
incWis
public void incWis(int x)
incPcp
public void incPcp(int x)
incWea
public void incWea(int x)
tuneValues
public void tuneValues()
Toform
public String Toform()
- Use to get a form to pass through sockets from a dragon
toString
public String toString()
- A nice function for debugging
- Overrides:
- toString in class Object
cost
public int cost()
getOwner
public int getOwner()
setOwner
public void setOwner(int own)
main
public static void main(String args[])