Class ModelFactory
- java.lang.Object
-
- ch.sahits.game.openpatrician.model.ModelFactory
-
public class ModelFactory extends java.lang.Object
- Author:
- Andi Hotz, (c) Sahits GmbH, 2016 Created on Nov 13, 2016
-
-
Field Summary
Fields Modifier and Type Field Description private org.springframework.context.ApplicationContext
context
-
Constructor Summary
Constructors Constructor Description ModelFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IShipAuction
createAnonymousShipAuction(java.time.LocalDateTime auctionDate, int startingBid, IShip ship)
Retrieve an auction instance for aship
, that has no previous owner, e.g.IBuildingAuction
createBuildingAuction(java.time.LocalDateTime auctionDate, int startingBid, IPlayer owner, IBuilding building)
Retrieve an auction instance for thebuilding
owned byowner
, which will be auctioned onauctionDate
starting withstartingBid
IShipAuction
createShipAuction(java.time.LocalDateTime auctionDate, int startingBid, IPlayer owner, IShip ship)
Retrieve an auction instance for theship
owned byowner
, which will be auctioned onauctionDate
starting withstartingBid
-
-
-
Method Detail
-
createBuildingAuction
public IBuildingAuction createBuildingAuction(java.time.LocalDateTime auctionDate, int startingBid, IPlayer owner, IBuilding building)
Retrieve an auction instance for thebuilding
owned byowner
, which will be auctioned onauctionDate
starting withstartingBid
- Parameters:
auctionDate
- date of the auctionstartingBid
- first bid amountowner
- of the building to be auctioned.building
- that is auctioned.- Returns:
- new instance of a building auction
-
createAnonymousShipAuction
public IShipAuction createAnonymousShipAuction(java.time.LocalDateTime auctionDate, int startingBid, IShip ship)
Retrieve an auction instance for aship
, that has no previous owner, e.g. because it was captured during a blockade mission. The auction will happen onauctionDate
and start withstartingBid
.- Parameters:
auctionDate
- date of the auctionstartingBid
- first bid amountship
- that is auctioned.- Returns:
- new instance of a ship acution
-
createShipAuction
public IShipAuction createShipAuction(java.time.LocalDateTime auctionDate, int startingBid, IPlayer owner, IShip ship)
Retrieve an auction instance for theship
owned byowner
, which will be auctioned onauctionDate
starting withstartingBid
- Parameters:
auctionDate
- date of the auctionstartingBid
- first bid amountowner
- of the ship that is auctionedship
- that is auctioned.- Returns:
- new instance of a ship auction
-
-