Class BuildingProduction

    • Constructor Detail

      • BuildingProduction

        public BuildingProduction()
    • Method Detail

      • getTotalProduction

        public int getTotalProduction​(IWare ware,
                                      ICity city)
        Description copied from interface: IBuildingProduction
        Compute the total amount of ware that is produced in the city within a week
        Specified by:
        getTotalProduction in interface IBuildingProduction
        Parameters:
        ware - that is produced
        city - in witch the ware is produced
        Returns:
        total amount of all the production by all the players in the city
      • getProduction

        public int getProduction​(IWare ware,
                                 ICity city,
                                 IPlayer player)
        Description copied from interface: IBuildingProduction
        Compute the total amount of ware the player produces in the city within a week
        Specified by:
        getProduction in interface IBuildingProduction
        Parameters:
        ware - that is produced
        city - in witch the ware is produced
        player - that produces the ware
        Returns:
        total amount of the ware produced by that player in the city
      • getTotalConsumtion

        public int getTotalConsumtion​(IWare ware,
                                      ICity city)
        Description copied from interface: IBuildingProduction
        Retrieve the amount the workshops consume to produce the ware within a week
        Specified by:
        getTotalConsumtion in interface IBuildingProduction
        Parameters:
        ware - that is consumed
        city - in witch the ware is consumed
        Returns:
        amount of the ware that is consumed
      • getConsumption

        public int getConsumption​(IWare ware,
                                  ICity city,
                                  IPlayer player)
        Retrieve the amount of ware that all the workshops of a player consume within a week
        Parameters:
        ware - that is consumed
        city - in witch the ware is consumed
        player - who owns the workshops
        Returns:
        amount of the ware that is consumed