public override SavedSet SavedSet() { SavedSet output = new SavedSet(); output.CardList = HandList.ToRegularDeckDict(); return(output); }
//if i can't ask for it to begin with, do here for rummys. public bool IsAcceptableSet() { if (HandList.Count < 3) { return(false); } var thisList = HandList.ToRegularDeckDict(); if (thisList.Count(items => items.IsJoker) > 1) { return(false); //each set can only have one joker } var wildList = GetWildList(thisList); if (wildList.Count == 1) { if (_isNew) { if (thisList.Count(items => items.IsJoker == false && items.WhatDraw == EnumDrawType.FromHand) < 2) { return(false); //because needs 2 from hand. } } } var newRummy = HandList.ToRegularDeckDict(); if (_setType == EnumWhatSets.Runs) { return(_rummys.IsNewRummy(newRummy, newRummy.Count, RummyProcesses <EnumColorType, EnumColorType, TileInfo> .EnumRummyType.Runs)); } return(_rummys.IsNewRummy(newRummy, newRummy.Count, RummyProcesses <EnumColorType, EnumColorType, TileInfo> .EnumRummyType.Sets)); }
public CustomBasicList <YahtzeeResults> GetResults() { var tempComboList = _model !.ComboHandList !.HandList.ToRegularDeckDict(); var otherList = SingleInfo !.MainHandList.GetInterfaceList(); return(_yatz.GetResults(tempComboList, otherList)); }
public override SavedSet SavedSet() { SavedSet output = new SavedSet(); output.TileList = HandList.ToRegularDeckDict(); output.IsNew = _isNew; output.SetType = _setType; return(output); }
public override SavedSet SavedSet() { SavedSet output = new SavedSet(); output.CardList = HandList.ToRegularDeckDict(); output.UseSecond = _useSecond; output.SetType = _setType; return(output); }
public override SavedSet SavedSet() { SavedSet output = new SavedSet(); output.CardList = HandList.ToRegularDeckDict(); output.UseSecond = _useSecond; output.WhatSet = _whatSet; if (_firstNumber > 12 && _whatSet == RummyProcesses <EnumSuitList, EnumColorList, ChinazoCard> .EnumRummyType.Sets) { throw new BasicBlankException("The first number when doing sets can never be higher than 12 when doing autoresume"); } output.FirstNumber = _firstNumber; return(output); }
public async Task PlayerGoesOutAsync(YahtzeeResults thisResults) { SingleInfo !.Results = thisResults; var tempList = _model !.ComboHandList !.HandList.ToRegularDeckDict(); var thisCombo = tempList.Single(items => items.Points == thisResults.Points); _model.ComboHandList.HandList.ReplaceAllWithGivenItem(thisCombo); //hopefully this simple. bool rets; if (SaveRoot !.FirstPlayerWentOut == 0) { rets = true; SingleInfo.InGame = false; await UIPlatform.ShowMessageAsync($"{SingleInfo.NickName} first went out"); SaveRoot.FirstPlayerWentOut = WhoTurn; }
public override Task PopulateSaveRootAsync() { SaveRoot !.SetList = _model !.MainSets1 !.SavedSets(); SaveRoot.DiscardList = _model.DiscardList1 !.HandList.ToRegularDeckDict(); return(base.PopulateSaveRootAsync()); }
public override async Task PopulateSaveRootAsync() { await PlayerList !.ForEachAsync(async thisPlayer => { thisPlayer.PlanetData = await js.SerializeObjectAsync(thisPlayer.PlanetHand !.HandList.ToRegularDeckDict()); thisPlayer.SavedMoonList = thisPlayer.Moons !.SavedSets(); }); await base.PopulateSaveRootAsync(); }
protected async override Task FinishSaveAsync() { //anything else to finish save will be here. SaveRoot.StockCards = GlobalClass.Stock !.HandList.ToRegularDeckDict(); await base.FinishSaveAsync(); }