public PlayerLedger(PlayerInfo info, Account factionAccount, Account playerAccount) { this.info = info; FactionAccount = factionAccount; PersonalAccount = playerAccount; norm = new PlayerNorm(factionAccount, playerAccount); }
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); }