Exemple #1
0
 public void Test1()
 {
     Contract contract = new Contract(new Bid(3, Suit.Hearts), 0);
     List<Trick> tricks = TestTricks(Suit.Hearts, Seat.East);
     Score score = new Score(Seat.East, contract, tricks, Vulnerability.EastWest);;
     //int score1 = score.GetDeclarersGameScore();
     //int score2 = score.GetDeclarersBonusScore();
     //int score3 = score.GetDefendersScore();
     //bool game = score.DidDeclarerMakeGame;
     score.ToString();
 }
Exemple #2
0
        private static void TestScore()
        {
            Contract contract = new Contract(new Bid(3, Suit.Hearts), 0);
            List<Trick> tricks = TestTricks(Suit.Hearts, Seat.East);
            Score score = new Score(Seat.East, contract, tricks, Vulnerability.EastWest);

            Console.WriteLine("Declarer:{0}, Contract:{1}, ContractScore:{2}, MadeContract:{3}", score.Declarer, score.Contract, score.ContractScore, score.MadeContract);
            Console.WriteLine("Game:{0}, SmallSlam:{1}, GrandSlam:{2}", score.Game, score.SmallSlam, score.GrandSlam);
            Console.WriteLine("TricksDefeated:{0}, TricksTaken:{1}, Vulnerability:{2}, PartScore:{3}", score.TricksDefeated, score.TricksTaken, score.Vulnerability, score.PartScore);
            Console.WriteLine("Overtrick:{0}, Penalties:{1}, Bonus:{2}, Insult:{3}", score.GetOverTrickPoints(), score.GetPenalties(), score.GetLevelBonus(), score.GetInsult());
            Console.WriteLine(score.ToString());
            Console.ReadLine();
        }