Class ServerColonyTile

    • Field Detail

      • logger

        private static final java.util.logging.Logger logger
    • Constructor Detail

      • ServerColonyTile

        public ServerColonyTile​(Game game,
                                java.lang.String id)
        Trivial constructor for Game.newInstance.
        Parameters:
        game - The Game this object belongs to.
        id - The object identifier.
      • ServerColonyTile

        public ServerColonyTile​(Game game,
                                Colony colony,
                                Tile workTile)
        Creates at new ServerColonyTile.
        Parameters:
        game - The Game this object belongs to.
        colony - The Colony this object belongs to.
        workTile - The tile in which this ColonyTile represents a WorkLocation for.
    • Method Detail

      • expendResource

        private Resource expendResource​(Tile tile,
                                        GoodsType goodsType,
                                        UnitType unitType)
        This method is called only when a new turn is beginning. It will reduce the quantity of the bonus Resource that is on the given tile, if any and if applicable.
        Parameters:
        tile - The Tile to check for a resource.
        goodsType - The GoodsType the goods type to expend.
        unitType - The UnitType doing the production.
        Returns:
        The Resource if it is exhausted by this call (so it can be used in a message), otherwise null.
      • csNewTurn

        public void csNewTurn​(java.util.Random random,
                              LogBuilder lb,
                              ChangeSet cs)
        New turn for this colony tile.
        Specified by:
        csNewTurn in interface TurnTaker
        Parameters:
        random - A Random number source.
        lb - A LogBuilder to log to.
        cs - A ChangeSet to update.