Class PeopleFactory

    • Constructor Detail

      • PeopleFactory

        public PeopleFactory()
    • Method Detail

      • createNewCaptainProperty

        public ICaptain createNewCaptainProperty()
        Retrieve a new captain.
        Returns:
        new captain instance
      • createBowman

        public IBowmen createBowman()
      • createCrossbowman

        public ICrossbowmen createCrossbowman()
      • createPikeman

        public IPikemen createPikeman()
      • createMusketeer

        public IMusketeer createMusketeer()
      • createNewPirate

        public INonFreeSeaPirate createNewPirate​(java.lang.String firstName,
                                                 java.lang.String lastName,
                                                 IShip ship,
                                                 IPlayer hiree,
                                                 ICity nearCity)
        Create an new pirate anywhere on the sea
        Parameters:
        firstName - of the pirate
        lastName - of the pirate
        ship - of the pirate
        hiree - player who hired the pirate
        nearCity - city near which the pirate should roam or null.
        Returns:
        new non free pirate instance
      • createNewPirate

        public ISeaPirate createNewPirate​(java.lang.String firstName,
                                          java.lang.String lastName,
                                          INavigableVessel ship)
        Create a pirate near a certain point
        Parameters:
        firstName - of the pirate
        lastName - of the pirate
        ship - new ship of the pirate
        Returns:
        new sea pirate instance
      • free

        public void free​(INonFreeSeaPirate pirate)
        A non free pirate becomes free.
        Parameters:
        pirate - non free pirate instance that is to be freed.