Ejemplo n.º 1
0
        /// <summary>
        /// Adds positional values of the specified <see cref="PositionalStat"/> to the current <see cref="PositionalStat"/>
        /// </summary>
        public void Add(PositionalStat stat)
        {
            if (stat == null)
            {
                return;
            }

            EP += stat.EP;
            MP += stat.MP;
            CO += stat.CO;
            BN += stat.BN;
            SB += stat.SB;
            BB += stat.BB;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Create new instance of <see cref="PositionalStat"/> which is the sum of the specified <see cref="PositionalStat"/>
        /// </summary>
        public static PositionalStat Sum(PositionalStat a, PositionalStat b)
        {
            if (a == null)
            {
                a = new PositionalStat();
            }

            if (b == null)
            {
                b = new PositionalStat();
            }

            return(new PositionalStat
            {
                EP = a.EP + b.EP,
                MP = a.MP + b.MP,
                CO = a.CO + b.CO,
                BN = a.BN + b.BN,
                SB = a.SB + b.SB,
                BB = a.BB + b.BB,
            });
        }