Class MediterreanSeaMap
- java.lang.Object
-
- ch.sahits.game.openpatrician.model.city.guild.impl.MediterreanSeaMap
-
- All Implemented Interfaces:
IMediterreanMap
public class MediterreanSeaMap extends java.lang.Object implements IMediterreanMap
- Author:
- Andi Hotz, (c) Sahits GmbH, 2016 Created on Nov 06, 2016
-
-
Constructor Summary
Constructors Constructor Description MediterreanSeaMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTradeAgreement(IPlayer player, ITradeAgreement agreement)Add a trade agreement for a player.booleanexploreSpot(IPlayer player, javafx.geometry.Point2D coordinates)Player explored a spot and may have detected a trading spot.java.util.Map<javafx.geometry.Point2D,IMediterreanCity>getDiscoveredTradingSpots()Retrieve a map of all discovered trading spot locations along with their names.java.util.List<javafx.geometry.Point2D>getExploredLocations(IPlayer player)Retrieve a list of all discovered location for a player.java.util.List<ITradeAgreement>getTradeAgreements(IPlayer player)Retreive the trade agreements for a specific player.
-
-
-
Method Detail
-
exploreSpot
public boolean exploreSpot(IPlayer player, javafx.geometry.Point2D coordinates)
Description copied from interface:IMediterreanMapPlayer explored a spot and may have detected a trading spot. Trading spots can be detected in a certain radius of the explored spot.- Specified by:
exploreSpotin interfaceIMediterreanMap- Parameters:
player- that does the exploringcoordinates- location that is explored- Returns:
- true if a new trading spot was discovered.
-
getDiscoveredTradingSpots
public java.util.Map<javafx.geometry.Point2D,IMediterreanCity> getDiscoveredTradingSpots()
Description copied from interface:IMediterreanMapRetrieve a map of all discovered trading spot locations along with their names.- Specified by:
getDiscoveredTradingSpotsin interfaceIMediterreanMap- Returns:
- map of coordinates and names of trading spots in the mediterrenian.
-
getExploredLocations
public java.util.List<javafx.geometry.Point2D> getExploredLocations(IPlayer player)
Description copied from interface:IMediterreanMapRetrieve a list of all discovered location for a player.- Specified by:
getExploredLocationsin interfaceIMediterreanMap- Parameters:
player- for which the location should be retrieved.- Returns:
- list of all disovered locations.
-
addTradeAgreement
public void addTradeAgreement(IPlayer player, ITradeAgreement agreement)
Description copied from interface:IMediterreanMapAdd a trade agreement for a player.- Specified by:
addTradeAgreementin interfaceIMediterreanMap- Parameters:
player- for whom to add an agreementagreement- to be added.
-
getTradeAgreements
public java.util.List<ITradeAgreement> getTradeAgreements(IPlayer player)
Description copied from interface:IMediterreanMapRetreive the trade agreements for a specific player.- Specified by:
getTradeAgreementsin interfaceIMediterreanMap- Parameters:
player- for which the agreement should be looked up.- Returns:
- list of trade agreements.
-
-