Interface IPlayer

    • Method Detail

      • getPersonalData

        IPersonalData getPersonalData()
        Retrieve the personal data of the player
        Returns:
        personal data of the player.
      • getSpouseData

        java.util.Optional<ISpouseData> getSpouseData()
        Retrieve the personal data of the players spouse.
        Returns:
        Optional spouse data. Empty if the player is not married.
      • getCompany

        ICompany getCompany()
        Retrieve the company data
        Returns:
        company of the player.
      • getFleet

        java.util.List<IShip> getFleet()
        Get a list of all ships
        Returns:
        list of the players ships.
      • getSelectableVessels

        java.util.List<INavigableVessel> getSelectableVessels()
        Provide a different view on the fleet by containing all the vessels that can be selected.
        Returns:
        list of vessels that can be activated.
      • addSelectableVessel

        void addSelectableVessel​(INavigableVessel vessel)
        Add a selectable vessel to the list.
        Parameters:
        vessel - to be added
      • removeSelectableVessel

        void removeSelectableVessel​(INavigableVessel vessel)
        Remove a selectable vessel from the list.
        Parameters:
        vessel - to be removed.
      • findShips

        java.util.List<INavigableVessel> findShips​(ICity city)
        Find all ships in a city
        Parameters:
        city - in which to fin ships
        Returns:
        list of vessels in the city
      • addShip

        void addShip​(IShip ship)
        Add a new ship for the player
        Parameters:
        ship - to be added to the fleet.
      • removeShip

        void removeShip​(IShip ship)
        Remove a ship for the player
        Parameters:
        ship - to be removed from the fleet.
      • findBuildings

        java.util.List<IBuilding> findBuildings​(ICity city)
        Find all buildings of the player in the city
        Parameters:
        city - where to search for buildings.
        Returns:
        list of buildings in city owned by the player.
      • findTradingOffice

        java.util.Optional<ITradingOffice> findTradingOffice​(ICity city)
        Find the trading office of the player in the city.
        Parameters:
        city - where to look for a trading office
        Returns:
        Optional trading office. Empty if there is none in the city.
      • findBuildings

        <T extends IBuilding> java.util.List<T> findBuildings​(ICity city,
                                                              java.lang.Class<T> buildingClass)
        Find all buildings in the city that are some subtype of the indicated class
        Parameters:
        city - in which to look for buildings
        buildingClass - class of the building that is searched
        Returns:
        type cast list of the buildings in city.
      • updateRank

        void updateRank​(ESocialRank rank)
        Update to the new social rank
        Parameters:
        rank - new social rank.
      • setCareerLevel

        void setCareerLevel​(ICareer career)
        Set the current career level.
        Parameters:
        career - new career level
      • setSegmentedMap

        void setSegmentedMap​(MapSegmentedImage mapSegments)
        Set or unset the image for a segmented map (treasure or pirate hideout).
        Parameters:
        mapSegments - to be set or unset (null)
      • getSegmentedMap

        MapSegmentedImage getSegmentedMap()
        Retrieve the segmented image map.
        Returns:
        segmented image map
      • marry

        void marry​(ISpouseData spouse)
        Conclude the marriage.
        Parameters:
        spouse - data for the spouse.
      • spouseDies

        void spouseDies()
        Widow and become unmarried again.
      • getChildren

        java.util.List<IChild> getChildren()
        Retrieve all children.
        Returns:
        list of children
      • updateCrimialDrive

        void updateCrimialDrive​(int value)
        Update the new value indicating the level of criminallity of the player
        Parameters:
        value - new criminal drive value.
      • getCriminalDrive

        int getCriminalDrive()
        Retrieve the value indicating the criminal drive of the player.
        Returns:
        criminal drive
      • getUuid

        java.lang.String getUuid()
        Retrieve the UUID identifing this player.
        Returns:
        UUID of the player.