public bool ForceSatisfy() { if (_model.TrainStation1 !.NeedDouble(out int numberNeeded) == false) { return(false); } if (SaveRoot !.CurrentPlayerDouble == true) { return(false); } if (numberNeeded < 0) { throw new BasicBlankException("The number neeed has to at least be 0"); } foreach (var thisPlayer in PlayerList !) { if (thisPlayer.ObjectCount < 5 && WhoTurn != thisPlayer.Id) { return(false); } } DeckRegularDict <MexicanDomino> tempList = SingleInfo !.MainHandList.ToRegularDeckDict(); tempList.AddRange(SingleInfo.LongestTrainList); return(tempList.Any(items => items.FirstNum == numberNeeded || items.SecondNum == numberNeeded)); }
internal bool NeedsExpansion(DeckRegularDict <RegularRummyCard> list) { if (SaveRoot.MoreThanOne == false) { return(false); } if (list.Any(x => x.Deck == _gameContainer.PreviousCard)) { return(false); } var hand = SingleInfo !.MainHandList.ToRegularDeckDict(); hand.RemoveGivenList(list); return(hand.Any(x => x.Deck == _gameContainer.PreviousCard)); }