ch.sahits.game.openpatrician.model.building
Class BuildingFactory

java.lang.Object
  extended by ch.sahits.game.openpatrician.model.building.BuildingFactory

public class BuildingFactory
extends Object

Factory to create building instances. Creating instances also attaches the building to a city

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

Constructor Summary
BuildingFactory()
           
 
Method Summary
static ITradingOffice createTridingOffice(IPlayer player, ICity city, int value)
          Create a new trading office in the city.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BuildingFactory

public BuildingFactory()
Method Detail

createTridingOffice

public static ITradingOffice createTridingOffice(IPlayer player,
                                                 ICity city,
                                                 int value)
Create a new trading office in the city. This method checks if the player has already a traiding office in the city. If yes an exception is thrown

Parameters:
player -
city - to build the trading office in
Returns:
New instance of a trading office affiliated with the city.
Throws:
IllegalStateException - if the player has already a Trading office in the city


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