예제 #1
0
        public void TestmakeTradeThrowsWhenPlayerCannotMakeTrade()
        {
            var player1 = new Player();
            var player2 = new Player();
            player1.incrementCities();
            player1.generateOre();
            player2.incrementCities();
            player2.generateBrick();
            int[] player1Hand = new int[] {2, 0, 0, 0, 0};
            int[] threeBricks = new int[] {0, 0, 0, 0, 3};
            player1.proposeTrade(player2, player1Hand, threeBricks);

            // should throw because player2 only has 2 bricks
            player2.makeTrade();
        }
예제 #2
0
 public void TestMakeTrade()
 {
     var player1 = new Player();
     var player2 = new Player();
     player1.incrementCities();
     player1.generateOre();
     player2.incrementCities();
     player2.generateBrick();
     int[] player1Hand = new int[] {2, 0, 0, 0, 0};
     int[] player2Hand = new int[] {0, 0, 0, 0, 2};
     player1.proposeTrade(player2, player1Hand, player2Hand);
     player2.makeTrade();
 }