Exemplo n.º 1
0
        public CatanPlayer(CatanGame game, Player player)
            : base((IGame <GameHub>)game, player)
        {
            if (logger.IsInfoEnabled)
            {
                logger.InfoFormat("New Catan Player [{0}] [{1}]", player.Name, this.Color);
            }

            playerUpdate = new PartialPlayerUpdate(Name);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Gets the players partial update object, containing all the information
        /// that has changed since the last update was requested.
        /// </summary>
        /// <param name="reset"></param>
        /// <returns></returns>
        public PartialPlayerUpdate GetPartialUpdate(bool reset = true)
        {
            if (logger.IsInfoEnabled)
            {
                logger.InfoFormat("Get Partial Update");
            }

            var update = playerUpdate;

            if (reset)
            {
                playerUpdate = new PartialPlayerUpdate(Name);
            }
            return(update);
        }