Class Cog
- java.lang.Object
-
- ch.sahits.game.openpatrician.model.ship.impl.Ship
-
- ch.sahits.game.openpatrician.model.ship.impl.Cog
-
- All Implemented Interfaces:
ICog
,INavigableVessel
,IShip
public class Cog extends Ship implements ICog
-
-
Field Summary
Fields Modifier and Type Field Description private ShipProperties
shipProperties
private ShipWeaponsLocationFactory
weaponsLocationFactory
-
Fields inherited from class ch.sahits.game.openpatrician.model.ship.impl.Ship
name, shipUpgradeLevel
-
-
Constructor Summary
Constructors Constructor Description Cog(EShipUpgrade upgradeLevel, java.lang.String name)
Constructor initializing the name and the upgrade levelCog(java.lang.String name)
Constructor for a Crayer without any upgrade
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EShipType
getShipType()
Retrieve the type of the ship.private void
init()
-
Methods inherited from class ch.sahits.game.openpatrician.model.ship.impl.Ship
addPassenger, clearLoadedWares, damage, getCapacity, getCargoValue, getCurrentSpeed, getDamage, getLoadableSpace, getLoadBinding, getLoadedWares, getMaxNumberOfSailors, getNumberOfSailors, getOccupiedSpaceByWeapons, getOwner, getPirateFlag, getTopSpeed, getUpgradeSpaceReduction, getValue, getWare, getWeaponAmount, initializeProperties, isUpgradable, leavePassenger, load, numberOfSailorsProperty, parentShipProperty, passengerPresentProperty, pirateFlagProperty, repair, setAutoTrading, setCaptain, setNumberOfSailors, setOwner, setTravelState, togglePirateFlag, toString, travelState, unload, updateHandweapon, upgrade
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ch.sahits.game.openpatrician.model.ship.INavigableVessel
damage, getAutotrading, getCapacity, getCaptian, getCurrentSpeed, getDamage, getLoadableSpace, getLoadBinding, getLoadedWares, getLocation, getMinNumberOfSailors, getName, getNumberOfSailors, getOwner, getPirateFlag, getSize, getTopSpeed, getUuid, getWare, getWeaponAmount, load, pirateFlagProperty, setAutoTrading, setLocation, togglePirateFlag, unload
-
Methods inherited from interface ch.sahits.game.openpatrician.model.ship.IShip
addPassenger, getCargoValue, getDistanceInKmForOneHealthPointReduction, getMaxNumberOfSailors, getOccupiedSpace, getOccupiedSpaceByWeapons, getPassenger, getShipUpgradeLevel, getUpgradeSpaceReduction, getValue, getWeaponSlots, isAvailable, isUpgradable, leavePassenger, numberOfSailorsProperty, parentShipProperty, passengerPresentProperty, repair, setAvailable, setCaptain, setName, setNumberOfSailors, setOccupiedSpace, setOwner, setTravelState, setWeaponSlots, travelState, updateHandweapon, upgrade
-
-
-
-
Field Detail
-
shipProperties
@Autowired private ShipProperties shipProperties
-
weaponsLocationFactory
@Autowired private ShipWeaponsLocationFactory weaponsLocationFactory
-
-
Constructor Detail
-
Cog
public Cog(EShipUpgrade upgradeLevel, java.lang.String name)
Constructor initializing the name and the upgrade level- Parameters:
upgradeLevel
- upgrade level of the cogname
- ships name
-
Cog
public Cog(java.lang.String name)
Constructor for a Crayer without any upgrade- Parameters:
name
- of the cog
-
-
Method Detail
-
init
@PostConstruct private void init()
-
getShipType
public EShipType getShipType()
Description copied from interface:IShip
Retrieve the type of the ship.- Specified by:
getShipType
in interfaceIShip
- Returns:
- type of the ship
-
-