Class CourierState
- java.lang.Object
-
- ch.sahits.game.openpatrician.model.people.impl.BaseTavernPerson
-
- ch.sahits.game.openpatrician.model.people.impl.BasePatrolState
-
- ch.sahits.game.openpatrician.model.people.impl.CourierState
-
- All Implemented Interfaces:
ICourier,IPerson,ISideRoomPerson,ITavernPerson
public class CourierState extends BasePatrolState implements ICourier
Implementation of a courier. Every city can have a courier and is referenced through it's TavernEngine.- Author:
- Andi Hotz, (c) Sahits GmbH, 2013 Created on Jan 20, 2013
-
-
Field Summary
-
Fields inherited from class ch.sahits.game.openpatrician.model.people.impl.BasePatrolState
currentDestIndex, destinations
-
Fields inherited from class ch.sahits.game.openpatrician.model.people.impl.BaseTavernPerson
date
-
-
Constructor Summary
Constructors Constructor Description CourierState()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetCurrentDestIndex()Retrieve the current index in the destination list.ICity[]getDestinations()Retrieve the destinationsjava.lang.StringgetName()Get the name of the client.intgetPremium()Retrieve the premium for successful finishing the patrol.voidsetCurrentDestIndex(int index)Set the current index in the destination list.voidsetDestinations(ICity[] cities)Set the destination city of the patrol.voidsetName(java.lang.String name)Set the name of the client.voidsetPremium(int premium)Set the premium for task completion.-
Methods inherited from class ch.sahits.game.openpatrician.model.people.impl.BaseTavernPerson
arrive, getMaxDaysAbsent, getMaxDaysPresent, getNumberOfDaysSinceArrival, isPresent, isPresentProperty, leave
-
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.people.ITavernPerson
arrive, getArrivalDate, getMaxDaysAbsent, getMaxDaysPresent, getNumberOfDaysSinceArrival, isPresent, isPresentProperty, leave, setCity
-
-
-
-
Method Detail
-
getName
public abstract java.lang.String getName()
Get the name of the client.- Returns:
- name of the person
-
setName
public abstract void setName(java.lang.String name)
Set the name of the client.- Parameters:
name- of the client
-
getDestinations
public abstract ICity[] getDestinations()
Retrieve the destinations- Returns:
- array of destination cities.
-
setDestinations
public abstract void setDestinations(ICity[] cities)
Set the destination city of the patrol.- Parameters:
cities- array of destination cities.
-
getPremium
public abstract int getPremium()
Retrieve the premium for successful finishing the patrol.- Returns:
- premium for completing the patrol
-
setPremium
public abstract void setPremium(int premium)
Set the premium for task completion.- Parameters:
premium- for completing the patrol
-
setCurrentDestIndex
public abstract void setCurrentDestIndex(int index)
Set the current index in the destination list.- Parameters:
index- current index of the destination
-
getCurrentDestIndex
public abstract int getCurrentDestIndex()
Retrieve the current index in the destination list.- Returns:
- current index of the destination.
-
-