Ejemplo n.º 1
0
 public void CollectStitch(Player player)
 {
     LastStitch.Clear();
     LastStitch.AddRange(Stitch);
     Stitch.Clear();
     if (CurrentPlayer == player &&
         GamePlayer == player &&
         player.Game.Type == GameType.Null && player.Stitches.Any())
     {
         foreach (var p in Players)
         {
             p.Cards.Clear();
         }
     }
     if (player.Cards.Count == 0)
     {
         var game = GamePlayer.Game;
         GameValue         = game.GetGameValue(MatadorsJackStraight, GamePlayer.Stitches, Skat, CurrentBidValue, false);
         GamePlayer.Score += GameValue.Score;
         CurrentHistory.GamePlayerScore = GetScore(GamePlayer);
         CurrentHistory.GameValue       = GameValue.Score;
         SkatResult.History.Add(CurrentHistory);
         SkatResult.EndedUtc = DateTime.UtcNow;
     }
 }
Ejemplo n.º 2
0
 public void CollectStitch(Player player)
 {
     LastStitch.Clear();
     LastStitch.AddRange(Stitch);
     Stitch.Clear();
     if (CurrentPlayer == player &&
         GamePlayer == player &&
         player.Game.Type == GameType.Null && player.Stitches.Any())
     {
         foreach (var p in Players)
         {
             p.Cards.Clear();
         }
     }
     if (player.Cards.Count == 0)
     {
         var game = GamePlayer.Game;
         GameValue         = game.GetGameValue(MatadorsJackStraight, GamePlayer.Stitches, Skat, CurrentBidValue, false);
         GamePlayer.Score += GameValue.Score;
     }
 }