public void AddCard(RegularRummyCard thisCard, int position) { thisCard.IsSelected = false; thisCard.Drew = true; //others has to know what was played. thisCard.Player = _gameContainer.WhoTurn; if (position == 1) { HandList.InsertBeginning(thisCard); } else { HandList.Add(thisCard); } }
public void AddCard(MonasteryCardInfo thisCard, int position) { var newCard = GetCard(thisCard, position); var finalCard = new MonasteryCardInfo(); finalCard.Populate(newCard.Deck); finalCard.Deck = thisCard.Deck; //i think if (position == 1) { HandList.InsertBeginning(finalCard); } else { HandList.Add(finalCard); } }
public void AddCard(ChinazoCard thisCard, int position) { thisCard.IsSelected = false; thisCard.Drew = false; int newPosition = PositionToPlay(thisCard, position); if (newPosition == 1) { if (_whatSet == RummyProcesses <EnumSuitList, EnumColorList, ChinazoCard> .EnumRummyType.Runs) { if (thisCard.IsObjectWild == true) { thisCard.UsedAs = HandList.First().UsedAs - 1; } if (thisCard.UsedAs == 14) { throw new BasicBlankException("Ace cannot be used as 14 when its low."); } _firstNumber = thisCard.UsedAs; } HandList.InsertBeginning(thisCard); } else { if (_whatSet == RummyProcesses <EnumSuitList, EnumColorList, ChinazoCard> .EnumRummyType.Runs) { if (thisCard.IsObjectWild == true) { thisCard.UsedAs = HandList.Last().UsedAs + 1; if (thisCard.UsedAs > 14) { throw new BasicBlankException("Use as can never be higher than 14 ever"); } } } HandList.Add(thisCard); } if (_whatSet == RummyProcesses <EnumSuitList, EnumColorList, ChinazoCard> .EnumRummyType.Runs) { RepopulateCards(); } }
public void AddCard(GalaxyCardGameCardInformation thisCard) { GalaxyCardGameCardInformation originalCard = HandList.First(); thisCard.Drew = false; thisCard.IsSelected = false; if (WhatSet == EnumWhatSets.Kinds) { HandList.Add(thisCard); return; } if ((int)thisCard.Value == (int)originalCard.Value - 1) { HandList.InsertBeginning(thisCard); } else { HandList.Add(thisCard); } }
public void AddCard(Phase10CardInformation thisCard, int position) { thisCard.IsSelected = false; thisCard.Drew = false; if (position == 1) { if (_whatSet == EnumWhatSets.Runs && thisCard.CardCategory == EnumCardCategory.Wild) { thisCard.Number = HandList.First().Number - 1; } HandList.InsertBeginning(thisCard); } else { if (_whatSet == EnumWhatSets.Runs && thisCard.CardCategory == EnumCardCategory.Wild) { thisCard.Number = HandList.Last().Number + 1; } HandList.Add(thisCard); } }
public void AddTile(TileInfo thisTile, int position) { TileRummySaveInfo saveRoot = cons !.Resolve <TileRummySaveInfo>(); thisTile.Drew = true; // this should be okay so others can tell something was added to it. thisTile.IsSelected = false; saveRoot.TilesFromField.RemoveSpecificItem(thisTile.Deck); if (((int)_setType == (int)EnumWhatSets.Runs) & (thisTile.IsJoker == true)) { TileInfo newTile; if (position == 1) { newTile = HandList.First(); thisTile.Number = newTile.Number - 1; HandList.InsertBeginning(thisTile); } else { newTile = HandList.Last(); thisTile.Number = newTile.Number + 1; HandList.Add(thisTile); } } else { HandList.Add(thisTile); } if ((int)_setType == (int)EnumWhatSets.Runs) { var TempList = (from Items in HandList orderby Items.Number select Items).ToList(); HandList.ReplaceRange(TempList); } }