Class EngineFactory
- java.lang.Object
-
- ch.sahits.game.openpatrician.engine.EngineFactory
-
@Service @Lazy @DependentInitialisation(ch.sahits.game.openpatrician.model.initialisation.StartNewGameBean.class) public class EngineFactory extends java.lang.ObjectThis abstraction layer for creating engines allows better decoupling and allows therefore easier testing.- Author:
- Andi Hotz, (c) Sahits GmbH, 2014 Created on Dec 20, 2014
-
-
Constructor Summary
Constructors Constructor Description EngineFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ch.sahits.game.openpatrician.utilities.CancelableRunnablecreateNextBidTask(ch.sahits.game.openpatrician.model.city.guild.IAuction auction)CityWallBuildingTaskgetCityWallBuildingTask(ch.sahits.game.openpatrician.model.city.impl.CityWall cityWall, java.time.LocalDateTime executionTime)CityWallMaterialBuyingTaskgetCityWallBuyMaterialTask(ch.sahits.game.openpatrician.model.city.cityhall.ICityHall cityHall, java.time.LocalDateTime executionTime)ElectionTaskgetNewElectionTask(ch.sahits.game.openpatrician.utilities.collections.SortedMapRandomizedSameElements candidates, ch.sahits.game.openpatrician.model.city.cityhall.impl.Election result, java.time.LocalDateTime executionTime, ch.sahits.game.openpatrician.model.city.ICity city)AddViolationTaskgetViolationTask(ch.sahits.game.openpatrician.model.city.cityhall.ICityViolation violation, ch.sahits.game.openpatrician.model.city.cityhall.IAldermanOffice office, java.time.LocalDateTime executionTime)VoteTaskgetVoteTask(boolean yes, java.time.LocalDateTime executionTime, ch.sahits.game.openpatrician.model.city.cityhall.impl.Ballot result)
-
-
-
Method Detail
-
getNewElectionTask
public ElectionTask getNewElectionTask(ch.sahits.game.openpatrician.utilities.collections.SortedMapRandomizedSameElements candidates, ch.sahits.game.openpatrician.model.city.cityhall.impl.Election result, java.time.LocalDateTime executionTime, ch.sahits.game.openpatrician.model.city.ICity city)
-
getVoteTask
public VoteTask getVoteTask(boolean yes, java.time.LocalDateTime executionTime, ch.sahits.game.openpatrician.model.city.cityhall.impl.Ballot result)
-
getCityWallBuildingTask
public CityWallBuildingTask getCityWallBuildingTask(ch.sahits.game.openpatrician.model.city.impl.CityWall cityWall, java.time.LocalDateTime executionTime)
-
getCityWallBuyMaterialTask
public CityWallMaterialBuyingTask getCityWallBuyMaterialTask(ch.sahits.game.openpatrician.model.city.cityhall.ICityHall cityHall, java.time.LocalDateTime executionTime)
-
getViolationTask
public AddViolationTask getViolationTask(ch.sahits.game.openpatrician.model.city.cityhall.ICityViolation violation, ch.sahits.game.openpatrician.model.city.cityhall.IAldermanOffice office, java.time.LocalDateTime executionTime)
-
createNextBidTask
public ch.sahits.game.openpatrician.utilities.CancelableRunnable createNextBidTask(ch.sahits.game.openpatrician.model.city.guild.IAuction auction)
-
-