コード例 #1
0
 public PlayerLedger(PlayerInfo info, Account factionAccount, Account playerAccount)
 {
     this.info       = info;
     FactionAccount  = factionAccount;
     PersonalAccount = playerAccount;
     norm            = new PlayerNorm(factionAccount, playerAccount);
 }
コード例 #2
0
        private PlayerLedger captureGameEffectPoints(PlayerLedger ledger)
        {
            var norm = new PlayerNorm(ledger.FactionAccount, ledger.PersonalAccount);

            if (norm != ledger.norm)
            {
                return(ledger);
            }

            log(() => $"norm is {Serializer.Serialize(norm)}\nledger norm is:{Serializer.Serialize(ledger.norm)}\nplayer points is:{ledger.info.upgrade}");

            if (ledger.PersonalAccount.balances[ResourceType.Points] != ledger.info.upgrade)
            {
                ledger.PersonalAccount.balances[ResourceType.Points] = ledger.info.upgrade;
            }
            return(ledger);
        }