ch.sahits.game.openpatrician.model.ship.impl
Class Holk

java.lang.Object
  extended by ch.sahits.game.openpatrician.model.ship.impl.Ship
      extended by ch.sahits.game.openpatrician.model.ship.impl.Holk
All Implemented Interfaces:
IHolk, IShip

public class Holk
extends Ship
implements IHolk


Field Summary
private  int size
          Size in barrels
 
Fields inherited from class ch.sahits.game.openpatrician.model.ship.impl.Ship
fitness, name, upgradeLevel
 
Constructor Summary
Holk(EShipUpgrade upgradeLevel, String name, int value)
          Constructor initializing the name and the upgrade level
Holk(String name, int value)
          Constructor for a Crayer without any upgrade
 
Method Summary
 void damage(Object damage)
          Damage the ship
 int getCapacity()
          Available capacity of the ship, this represent the free storage in barrels
 int getDamage()
          Retrieve the damage of the ship in percentage
 int getSize()
          Total capacity of the ship in barrels
 int getUpgradeSpaceReduction()
          Retrieve the reduction of the load capacity based on the upgrade level.
 void repair()
          Repair the damage
 
Methods inherited from class ch.sahits.game.openpatrician.model.ship.impl.Ship
clearLoadedWares, getLoad, getLoadedWares, getName, getValue, getWare, hasWeapons, isUpgradable, load, setName, unload, upgrade
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ch.sahits.game.openpatrician.model.ship.IShip
getLoad, getLoadedWares, getName, getValue, getWare, hasWeapons, isUpgradable, load, setName, unload, upgrade
 

Field Detail

size

private int size
Size in barrels

Constructor Detail

Holk

public Holk(EShipUpgrade upgradeLevel,
            String name,
            int value)
Constructor initializing the name and the upgrade level

Parameters:
upgradeLevel -
name -

Holk

public Holk(String name,
            int value)
Constructor for a Crayer without any upgrade

Parameters:
name -
Method Detail

getSize

public int getSize()
Description copied from interface: IShip
Total capacity of the ship in barrels

Specified by:
getSize in interface IShip
Returns:

getDamage

public int getDamage()
Description copied from interface: IShip
Retrieve the damage of the ship in percentage

Specified by:
getDamage in interface IShip
Returns:

damage

public void damage(Object damage)
Description copied from interface: IShip
Damage the ship

Specified by:
damage in interface IShip

repair

public void repair()
Description copied from interface: IShip
Repair the damage

Specified by:
repair in interface IShip

getCapacity

public int getCapacity()
Description copied from interface: IShip
Available capacity of the ship, this represent the free storage in barrels

Specified by:
getCapacity in interface IShip
Returns:

getUpgradeSpaceReduction

public int getUpgradeSpaceReduction()
Description copied from interface: IShip
Retrieve the reduction of the load capacity based on the upgrade level. The reduction is in barrel that reduces the initial size

Specified by:
getUpgradeSpaceReduction in interface IShip
Returns:
reduction in barrels


Copyright © 2011-2012 Sahits GmbH. All Rights Reserved.