Class EngineFactory


  • @Service
    @Lazy
    @DependentInitialisation(ch.sahits.game.openpatrician.model.initialisation.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
    • Constructor Summary

      Constructors 
      Constructor Description
      EngineFactory()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ch.sahits.game.openpatrician.utilities.CancelableRunnable createNextBidTask​(ch.sahits.game.openpatrician.model.city.guild.IAuction auction)  
      CityWallBuildingTask getCityWallBuildingTask​(ch.sahits.game.openpatrician.model.city.impl.CityWall cityWall, java.time.LocalDateTime executionTime)  
      CityWallMaterialBuyingTask getCityWallBuyMaterialTask​(ch.sahits.game.openpatrician.model.city.cityhall.ICityHall cityHall, java.time.LocalDateTime executionTime)  
      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)  
      AddViolationTask getViolationTask​(ch.sahits.game.openpatrician.model.city.cityhall.ICityViolation violation, ch.sahits.game.openpatrician.model.city.cityhall.IAldermanOffice office, java.time.LocalDateTime executionTime)  
      VoteTask getVoteTask​(boolean yes, java.time.LocalDateTime executionTime, ch.sahits.game.openpatrician.model.city.cityhall.impl.Ballot result)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EngineFactory

        public EngineFactory()
    • 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)