Class EngineFactory
- java.lang.Object
-
- ch.sahits.game.openpatrician.engine.EngineFactory
-
@Service @Lazy @DependentInitialisation(StartNewGameBean.class) public class EngineFactory extends java.lang.Object
This 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
-
-
Field Summary
Fields Modifier and Type Field Description private org.springframework.context.ApplicationContext
context
-
Constructor Summary
Constructors Constructor Description EngineFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CancelableRunnable
createNextBidTask(IAuction auction)
CityWallBuildingTask
getCityWallBuildingTask(CityWall cityWall, java.time.LocalDateTime executionTime)
CityWallMaterialBuyingTask
getCityWallBuyMaterialTask(ICityHall cityHall, java.time.LocalDateTime executionTime)
ElectionTask
getNewElectionTask(SortedMapRandomizedSameElements candidates, Election result, java.time.LocalDateTime executionTime, ICity city)
AddViolationTask
getViolationTask(ICityViolation violation, IAldermanOffice office, java.time.LocalDateTime executionTime)
VoteTask
getVoteTask(boolean yes, java.time.LocalDateTime executionTime, Ballot result)
-
-
-
Method Detail
-
getNewElectionTask
public ElectionTask getNewElectionTask(SortedMapRandomizedSameElements candidates, Election result, java.time.LocalDateTime executionTime, ICity city)
-
getVoteTask
public VoteTask getVoteTask(boolean yes, java.time.LocalDateTime executionTime, Ballot result)
-
getCityWallBuildingTask
public CityWallBuildingTask getCityWallBuildingTask(CityWall cityWall, java.time.LocalDateTime executionTime)
-
getCityWallBuyMaterialTask
public CityWallMaterialBuyingTask getCityWallBuyMaterialTask(ICityHall cityHall, java.time.LocalDateTime executionTime)
-
getViolationTask
public AddViolationTask getViolationTask(ICityViolation violation, IAldermanOffice office, java.time.LocalDateTime executionTime)
-
createNextBidTask
public CancelableRunnable createNextBidTask(IAuction auction)
-
-