public static DeckRegularDict <FluxxCardInformation> DiscardKeepers(FluxxGameContainer gameContainer, int howMany) { if (howMany <= 0) { throw new BasicBlankException("Must discard at least one keeper"); } var firsts = gameContainer.SingleInfo !.KeeperList.GetRandomList(false, howMany); return(new DeckRegularDict <FluxxCardInformation>(firsts)); }
public static Tuple <KeeperPlayer, KeeperPlayer> ExchangeKeepers(FluxxGameContainer gameContainer) { KeeperPlayer keeperFrom; keeperFrom = new KeeperPlayer() { Player = gameContainer.WhoTurn, Card = (int)gameContainer.SingleInfo !.KeeperList.GetRandomItem().Deck }; var tempList = gameContainer.PlayerList !.AllPlayersExceptForCurrent(); var tempPlayer = tempList.GetRandomItem(); KeeperPlayer KeeperTo = new KeeperPlayer() { Player = tempPlayer.Id, Card = (int)tempPlayer.KeeperList.GetRandomItem().Deck }; return(new Tuple <KeeperPlayer, KeeperPlayer>(keeperFrom, KeeperTo)); }
public async Task DiscardKeeperAsync(FluxxCardInformation thisCard) { _gameContainer.SingleInfo !.KeeperList.RemoveObjectByDeck(thisCard.Deck); await _gameContainer.AnimatePlayAsync !(thisCard); }