public void AddTempCardsToCrib(DeckRegularDict <CribbageCard> thisList)
        {
            var thisScore = _model !.HandScores.Single(items => items.HandCategory == EnumHandCategory.Crib);

            thisList.UnhighlightObjects();
            thisScore.TempList.AddRange(thisList);
        }
Exemplo n.º 2
0
 public HandScores CalculateScores()
 {
     if (ITricks.Count == IGame.TrickCount && ITricks.Last().IsComplete())
     {
         return(_scores = (_scores ?? ScoreCalculator.GetScores(this)));
     }
     return(null);
 }
        public void RemoveTempCards(IDeckDict <CribbageCard> ThisList)
        {
            var thisScore = _model !.HandScores.Single(items => items.HandCategory == EnumHandCategory.Hand1);

            // hand1 comes first
            if (thisScore.TempList.Count == 6)
            {
                thisScore.TempList.RemoveGivenList(ThisList);
                return;
            }
            thisScore = _model.HandScores.Single(items => items.HandCategory == EnumHandCategory.Hand2);
            if (thisScore.TempList.Count == 6)
            {
                thisScore.TempList.RemoveGivenList(ThisList);
                return;
            }
            throw new BasicBlankException("Error removing temp cards.  Think about what message to display.");
        }
 public ScoreHandCP GetScoreHand(EnumHandCategory thisCategory)
 {
     return(_model !.HandScores.Single(items => items.HandCategory == thisCategory));
 }
 public DeckRegularDict <CribbageCard> GetCards(EnumHandCategory thisCategory)
 {
     return(_model !.HandScores.Where(items => items.HandCategory == thisCategory).Select(items => items.TempList).Single());
 }