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

java.lang.Object
  extended by ch.sahits.game.openpatrician.model.ship.impl.WeaponsLocation

final class WeaponsLocation
extends Object

This class defines a weapon and its location on board a ship. There are weapons that take up two slots.

Author:
Andi Hotz, (c) Sahits GmbH, 2011 Created on Dec 23, 2011

Field Summary
private  EShipSide side
          Side of the ship either port or starboard
private  int slot
          Slot that is occupied by the weapon.
private  EWeapon weapon
          The weapon in the slot
 
Constructor Summary
WeaponsLocation(EShipSide side, EWeapon weapon, int slot)
           
 
Method Summary
 EShipSide getSide()
           
 int getSlot()
           
 EWeapon getWeapon()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

side

private final EShipSide side
Side of the ship either port or starboard


weapon

private final EWeapon weapon
The weapon in the slot


slot

private final int slot
Slot that is occupied by the weapon. If the weapon occupies two slots it is the slot closest to the stern.

Constructor Detail

WeaponsLocation

public WeaponsLocation(EShipSide side,
                       EWeapon weapon,
                       int slot)
Method Detail

getSide

public EShipSide getSide()

getWeapon

public EWeapon getWeapon()

getSlot

public int getSlot()


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