ch.sahits.game.openpatrician.model
Interface IPlayer

All Known Subinterfaces:
IAIPlayer
All Known Implementing Classes:
AIPlayer, Player

public interface IPlayer

Player in the game.

Author:
Andi Hotz, (c) Sahits GmbH, 2011 Created on Jun 15, 2011

Method Summary
 void addShip(IShip ship)
          Add a new ship for the player
 List<IBuilding> findBuildings(ICity city)
          Find all buildings of the player in the city
 List<IBuilding> findBuildings(ICity city, Class<? extends IBuilding> buildingClass)
          Find all buildings in the city that are some subtype of the indicated class
 ITradingOffice findTradingOffice(ICity city)
          Find the trading office of the player in the city.
 ICareer getCareerLevel()
          Retrieve the career level, which is either defined by EMilitantCareer or EEconomicCareer.
 long getCash()
          Retrieve the amount of money of the player
 ICompany getCompany()
          Retrieve the company data
 List<IShip> getFleet()
          Get a list of all ships
 ICity getHometown()
          Retrieve the players hometown
 String getLastName()
          Get a players last name
 String getName()
          Retrieve the players name
 IPersonalData getPersonalData()
          Retrieve the personal data of the player
 ESocialRank getRank()
          Retrieve the social rank of the player
 ISpouseData getSpouseData()
          Retrieve the personal data of the players spouse.
 boolean isMale()
          Check if the player is male
 void removeShip(IShip ship)
          Remove a ship for the player
 void updateCash(int diff)
          Change the available cash of the player
 void updateRank(ESocialRank rank)
          Update to the new social rank
 

Method Detail

getPersonalData

IPersonalData getPersonalData()
Retrieve the personal data of the player

Returns:

getSpouseData

ISpouseData getSpouseData()
Retrieve the personal data of the players spouse.

Returns:

getCompany

ICompany getCompany()
Retrieve the company data

Returns:

getName

String getName()
Retrieve the players name

Returns:

getLastName

String getLastName()
Get a players last name

Returns:

getHometown

ICity getHometown()
Retrieve the players hometown

Returns:

getFleet

List<IShip> getFleet()
Get a list of all ships

Returns:

addShip

void addShip(IShip ship)
Add a new ship for the player

Parameters:
ship -

removeShip

void removeShip(IShip ship)
Remove a ship for the player

Parameters:
ship -

isMale

boolean isMale()
Check if the player is male

Returns:

getCash

long getCash()
Retrieve the amount of money of the player

Returns:

updateCash

void updateCash(int diff)
Change the available cash of the player

Parameters:
diff -

findBuildings

List<IBuilding> findBuildings(ICity city)
Find all buildings of the player in the city

Parameters:
city -
Returns:

findTradingOffice

ITradingOffice findTradingOffice(ICity city)
Find the trading office of the player in the city. If there is no trading office null will be returned.

Parameters:
city -
Returns:

findBuildings

List<IBuilding> findBuildings(ICity city,
                              Class<? extends IBuilding> buildingClass)
Find all buildings in the city that are some subtype of the indicated class

Parameters:
city -
buildingClass -
Returns:

getRank

ESocialRank getRank()
Retrieve the social rank of the player

Returns:

updateRank

void updateRank(ESocialRank rank)
Update to the new social rank

Parameters:
rank -

getCareerLevel

ICareer getCareerLevel()
Retrieve the career level, which is either defined by EMilitantCareer or EEconomicCareer.

Returns:


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