public void LoadSavedGame(DominosRegularSaveInfo saveRoot) { _saveRoot = saveRoot; DominoList.ReplaceRange(new CustomBasicList <SimpleDominoInfo> { FirstDomino, CenterDomino, SecondDomino }); }
public void SavedDiscardPiles(SavedDiscardPile <D> save) { _objectList.Clear(); if (save.PileList.Count == 0 && save.CurrentCard.Deck == 0) { CurrentCard = new D(); return; } CurrentCard = save.CurrentCard; _objectList.ReplaceRange(save.PileList); _previousNum = _objectList.Count; }
public void ClearBoard(IDeckDict <SolitaireCard> thisCol) { if (thisCol.Count != CardsNeededToBegin) { throw new BasicBlankException($"Needs {CardsNeededToBegin}, not {thisCol.Count}"); } if (thisCol.Any(items => items.Value != EnumCardValueList.Queen)) { throw new BasicBlankException("Only queens can be used"); } thisCol.First().Angle = EnumRotateCategory.RotateOnly90; thisCol[2].Angle = EnumRotateCategory.RotateOnly90; CardList.ReplaceRange(thisCol); }
public void PopulateObjects(IDeckDict <D> thisList) // try just t (if regularcardinfo; then that will be the list. knows it has to be at least baseimages.cardinfo { if (IgnoreMaxRules == false) { if (thisList.Count > Maximum && Maximum > 0) { throw new BasicBlankException("The maximum objects allowed are " + Maximum); } } HandList.ReplaceRange(thisList); // i think its being replace. if its different, can fix AfterPopulateObjects(); }
public void LoadPlayerPieces(IDeckDict <D> thisList, ref DeckObservableDict <D> hand, bool isFirst) { hand.ReplaceRange(thisList); if (isFirst == false) { return; } DeckRegularDict <D> newList = new DeckRegularDict <D>(); foreach (var thisItem in thisList) { newList.Add(RemainingList.GetSpecificItem(thisItem.Deck)); } RemovePieces(newList); }
public void OriginalList(IEnumerableDeck <D> thisList) { _didOriginal = true; _objectList.ReplaceRange(thisList); // i think foreach (var thisCard in thisList) { if (DeckStyle == EnumStyleType.AlwaysKnown) { thisCard.IsUnknown = false; } else { thisCard.IsUnknown = true; } } }
public void FirstLoad(bool isKlondike, IDeckDict <SolitaireCard> cardList) { CardList.ReplaceRange(cardList); if (HasDiscard) { throw new BasicBlankException("Already shows there is a discard. This part should not have even ran. Find out what happened"); } Piles.IsKlondike = isKlondike; Piles.NumberOfPiles = HowManyPiles; if (Piles.PileList.Count == 0) { BeforeLoadingBoard(); Piles.LoadBoard(); } AfterFirstLoad(); }
public void ClearBoard(IDeckDict <TR> thisList) { if (Game == EnumGameList.None) { throw new BasicBlankException("Must choose game"); } else if (Game == EnumGameList.Skuck && thisList.Count != 16) { throw new BasicBlankException("Skuck requires 16 cards"); } else if (Game == EnumGameList.HorseShoe && thisList.Count != 8) { throw new BasicBlankException("Horseshoe requires 8 cards"); } CardList.ReplaceRange(thisList); RepositionCards(); }
protected void GetFirstPieces(int howMany, out DeckObservableDict <D> thisList) { if (ObjectList !.Count == 0) { throw new Exception("There must be at least one piece in order to get the first pieces"); } thisList = new DeckObservableDict <D>(); //i think. if (RemainingList.Count < howMany) { throw new Exception("There are only " + RemainingList.Count + " but was trying to get " + howMany + " pieces"); } ICustomBasicList <D> newList; newList = RemainingList.GetRandomList(true, howMany); if (RemainingList.Count == 0) { throw new Exception("Can't have 0 pieces remaining after getting random list"); } foreach (var thisCard in newList) { thisCard.IsUnknown = false; } thisList.ReplaceRange(newList); }
public void SavedGame(SavedScatteringPieces <D> save) { _mVarHasDrawn = save.HasDrawn; _clearedOut = save.ClearedOut; RemainingList.ReplaceRange(save.RemainingList); }
public void LoadSavedGame(IDeckDict <D> list) { ObjectList.ReplaceRange(list); //risk a breaking change here. so i don't have to use strings anymore for this. }