private void PutBackTrain(int decks) { var thisDomino = _mainGame !.SingleInfo !.LongestTrainList.GetSpecificItem(decks); _mainGame.SingleInfo.LongestTrainList.RemoveObjectByDeck(decks); _viewModel.PrivateTrain1 !.HandList.RemoveObjectByDeck(decks); _mainGame.SingleInfo.MainHandList.Add(thisDomino); thisDomino.IsSelected = false; _mainGame.SingleInfo.MainHandList.Sort(); _viewModel.UpdateCount(_mainGame.SingleInfo); }
private async Task TrainClickedAsync(int index) { CommandContainer.StartExecuting(); int decks = DominoSelected(out bool train); if (decks == 0) { await UIPlatform.ShowMessageAsync("Sorry, must have one domino selected to put on the pile"); CommandContainer.StopExecuting(); CommandContainer.ManualReport(); return; } MexicanDomino thisDomino; if (train) { thisDomino = _viewModel.PrivateTrain1 !.HandList.GetSpecificItem(decks); } else { thisDomino = _viewModel.PlayerHand1.HandList.GetSpecificItem(decks); } if (_viewModel.TrainStation1 !.CanPlacePiece(thisDomino, index) == false) { await UIPlatform.ShowMessageAsync("Illegal Move"); CommandContainer.StopExecuting(); return; } if (_mainGame.BasicData !.MultiPlayer) { SendPlay output = new SendPlay(); output.Deck = decks; output.Section = index; await _mainGame.Network !.SendAllAsync("dominoplayed", output); } if (train) { _mainGame !.SingleInfo !.LongestTrainList.RemoveObjectByDeck(decks); _viewModel.PrivateTrain1 !.HandList.RemoveObjectByDeck(decks); } else { _mainGame !.SingleInfo !.MainHandList.RemoveObjectByDeck(decks); } _viewModel.UpdateCount(_mainGame.SingleInfo !); await _viewModel.TrainStation1.AnimateShowSelectedDominoAsync(index, thisDomino, _mainGame); //hopefully this simple. CommandContainer.StopExecuting(); //try this as well. }
} = false; //sometimes this is needed for mobile. public void RemoveObject(int deck) { HandList.RemoveObjectByDeck(deck); }
public void RemoveCard(LifeCardGameCardInformation thisCard) { HandList.RemoveObjectByDeck(thisCard.Deck); }
public void RemoveDummyCard(int deck) { HandList.RemoveObjectByDeck(deck); }
protected override void RemoveFromMiscPiles(SolitaireCard thisCard) { GlobalClass.Stock !.HandList.RemoveObjectByDeck(thisCard.Deck); }
public void RemoveCard(SolitaireCard thisCard) => HandList.RemoveObjectByDeck(thisCard.Deck);