Class Dragon

Class Dragon

java.lang.Object
   |
   +----Dragon

public class Dragon
extends Object
Version:
1.0 Datatype for a dragon
Author:
Nicklas Hjalmarsson

Constructor Index

 o Dragon()
Default constructor
 o Dragon(String)
Constructor to make a dragon from a form do not use for creating new dragons

Method Index

 o attack()
 o cost()
 o defence()
 o flee(City)
 o flee(Dragon)
 o flee(Fod)
Use when a Dragon flees fom a battle to set his new Mission and destination
 o getArea(Area[][])
 o getDestination(Area[][])
 o getOwner()
 o incPcp(int)
 o incSpd(int)
 o incStr(int)
use to correct eventual malformed values
 o incWea(int)
 o incWis(int)
 o main(String[])
 o movement()
 o setDestination(Area)
 o setOwner(int)
 o Toform()
Use to get a form to pass through sockets from a dragon
 o toString()
A nice function for debugging
 o tuneValues()

Constructors

 o Dragon
  public Dragon()
Default constructor
 o Dragon
  public Dragon(String str)
Constructor to make a dragon from a form do not use for creating new dragons

Methods

 o getArea
  public Area getArea(Area Map[][])
 o getDestination
  public Area getDestination(Area Map[][])
 o movement
  public int movement()
 o attack
  public int attack()
 o defence
  public int defence()
 o flee
  public boolean flee(Dragon d)
Returns:
s true if the Dragon does not dare to stay and fight
 o flee
  public boolean flee(City c)
Returns:
s true if the Dragon does not dare to stay and fight against the city
 o flee
  public void flee(Fod game)
Use when a Dragon flees fom a battle to set his new Mission and destination
 o setDestination
  public void setDestination(Area a)
 o incStr
  public void incStr(int x)
use to correct eventual malformed values
 o incSpd
  public void incSpd(int x)
 o incWis
  public void incWis(int x)
 o incPcp
  public void incPcp(int x)
 o incWea
  public void incWea(int x)
 o tuneValues
  public void tuneValues()
 o Toform
  public String Toform()
Use to get a form to pass through sockets from a dragon
 o toString
  public String toString()
A nice function for debugging
Overrides:
toString in class Object
 o cost
  public int cost()
 o getOwner
  public int getOwner()
 o setOwner
  public void setOwner(int own)
 o main
  public static void main(String args[])