Beispiel #1
0
 public void DeduceGroup5()
 {
     VGame game = new VGame(Player.P1);
     game.ViewReceive(Player.P1, Owner.T, Card.TQ, Card.TK);
     Console.WriteLine(game);
     Assert.AreEqual(Owner.P123, game[Player.P1, Card.TA]);
 }
Beispiel #2
0
 public VGame(VGame src)
     : base(src)
 {
     _viewCards = new Owner[3, Card.Count];
     _viewCount = new int[3, Owner.Count];
     Array.Copy(src._viewCards, _viewCards, 3 * Card.Count);
     Array.Copy(src._viewCount, _viewCount, 3 * Owner.Count);
 }
Beispiel #3
0
        public void DeduceGroup1()
        {
            VGame game = new VGame(Player.P1);
            game.ViewReceive(Player.P1, Owner.P1, Card.A7, Card.A8, Card.A9, Card.A0, Card.AJ, Card.AQ, Card.AK, Card.AA, Card.T7, Card.T8);
            game.ViewReceive(Player.P1, Owner.P2, Card.B7, Card.B8, Card.B9, Card.B0, Card.BJ, Card.BQ, Card.BK, Card.BA, Card.T9, Card.T0);
            game.ViewReceive(Player.P1, Owner.P3, Card.C7, Card.C8, Card.C9, Card.C0, Card.CJ, Card.CQ, Card.CK, Card.CA, Card.TA, Card.TJ);

            Console.WriteLine(game);
            Assert.AreEqual(Owner.T, game[Player.P1, Card.TQ]);
            Assert.AreEqual(Owner.T, game[Player.P1, Card.TK]);
        }
Beispiel #4
0
        public void ConstructionTest1()
        {
            var deck1 = new List<Card>
            {
                Card.A7,
                Card.A8,
                Card.A9,
                Card.A0,
                Card.AJ,
                Card.C7,
                Card.C8,
                Card.C9,
                Card.C0,
                Card.CJ,
            };
            var deck2 = new List<Card>
            {
                Card.AQ,
                Card.AK,
                Card.AA,
                Card.B7,
                Card.B8,
                Card.CQ,
                Card.CK,
                Card.CA,
                Card.T7,
                Card.T8,
            };
            var deck3 = new List<Card>
            {
                Card.B9,
                Card.B0,
                Card.BJ,
                Card.BQ,
                Card.BA,
                Card.T9,
                Card.T0,
                Card.TJ,
                Card.TQ,
                Card.TA,
            };
            var talon = new List<Card> { Card.BK, Card.TK, };

            var game = new VGame(Player.P1,
                Card.A7, Card.A8, Card.A9, Card.A0, Card.AJ,
                Card.AQ, Card.AK, Card.AA, Card.B7, Card.B8,
                Card.B9, Card.B0, Card.BJ, Card.BQ, Card.BA,
                Card.BK, Card.TK,
                Card.C7, Card.C8, Card.C9, Card.C0, Card.CJ,
                Card.CQ, Card.CK, Card.CA, Card.T7, Card.T8,
                Card.T9, Card.T0, Card.TJ, Card.TQ, Card.TA);

            Console.WriteLine(game);

            foreach (var card in deck1)
            {
                Assert.IsTrue(game[Player.P1, card] >= Owner.P1);
                Assert.IsTrue(game[Player.P2, card] >= Owner.P1);
                Assert.IsTrue(game[Player.P3, card] >= Owner.P1);
            }
            foreach (var card in deck2)
            {
                Assert.IsTrue(game[Player.P1, card] >= Owner.P2);
                Assert.IsTrue(game[Player.P2, card] >= Owner.P2);
                Assert.IsTrue(game[Player.P3, card] >= Owner.P2);
            }
            foreach (var card in deck3)
            {
                Assert.IsTrue(game[Player.P1, card] >= Owner.P3);
                Assert.IsTrue(game[Player.P2, card] >= Owner.P3);
                Assert.IsTrue(game[Player.P3, card] >= Owner.P3);
            }
            foreach (var card in talon)
            {
                Assert.IsTrue(game[Player.P1, card] >= Owner.T);
                Assert.IsTrue(game[Player.P2, card] >= Owner.T);
                Assert.IsTrue(game[Player.P3, card] >= Owner.T);
            }
        }
Beispiel #5
0
 public void Receive1()
 {
     VGame game = new VGame(Player.P1);
     game.ViewReceive(Player.P1, Owner.P1, Card.A0);
     game.ViewReceive(Player.P1, Owner.P2, Card.A0);
 }