static private bool CheckResolution(string votingTarget, GameUser throneUser, List <IGrouping <int, GameUser> > gropeResult) { //оставляем только спорные группы gropeResult = gropeResult.Where(p => p.Count() > 1).ToList(); if (gropeResult.Count > 0) { Step newStep = throneUser.LastStep.CopyStep("Железный_трон", false); newStep.NewMessage("dynamic_kingClaim"); StringBuilder sb = new StringBuilder(); gropeResult.SelectMany(p => p).ToList().ForEach(p => sb.Append(p.HomeType).Append("|")); //todo костыль (добавляет карту одичалых в конец списка виновников) if (votingTarget == "Одичалые") { VesterosDecks vesterosDecks = throneUser.Game1.VesterosDecks.Where(p => p.VesterosCardType1.DecksNumber == 4).First(p => !p.IsFull); sb.Append(vesterosDecks.VesterosCardType1.Id.ToString()); } newStep.NewRaven(); newStep.Raven.StepType = sb.ToString(); return(false); } return(true); }
internal void CopyVesterosDecks(GameInfo gameInfo) { VesterosDecks result = new VesterosDecks(this.VesterosCardType1); result.Step = gameInfo.Step; result.Game = gameInfo.Game; result.GameInfo = gameInfo; result.VesterosActionType = this.VesterosActionType; result.VesterosActionType1 = this.VesterosActionType1; result.FirstId = this.FirstId; result.IsFull = this.IsFull; result.Sort = this.Sort; gameInfo.VesterosDecks.Add(result); }
public WCFGameInfo ToWCFGameInfo() { WCFGameInfo result = new WCFGameInfo(); result.Step = this.Step; result.Turn = this.Turn; result.Barbarian = this.Barbarian; result.Battle = this.Battle == null ? null : this.Battle.ToWCFBattle(); result.Garrison = new List <WCFGarrison>(); foreach (var item in this.Garrison) { result.Garrison.Add(item.ToWCFGarrison()); } result.VesterosDecks = new List <WCFVesterosDecks>(); foreach (var item in VesterosDecks.Where(p => p.IsFull)) { result.VesterosDecks.Add(item.ToWCFVesterosDecks()); } return(result); }