Example #1
0
 def test_diffence_considering_junk_table(self):
     game = Game(4)
     game.junk = set([8, 9, 10, 11])
     game.all_cards = set([12, 21, 13, 23, 24, 1, 20, 6, 7]) | game.junk
     game.table = [set([6, 7]), set([20]), set([24]), set([1])]
     game.hand = set([12, 21])
     self.assertEqual(game.choose(), 12)
Example #2
0
    def test_consecutive_taking_cards(self):
        game = Game(2, junk=set([23]))
        game.table = [set([1, 2, 3, 4, 5]), set([8, 9, 10, 11, 7]), set([20, 21]), set([22])]
        game.hand = set([6, 15, 16, 17])
        self.assertEqual(game.choose(), 15)

        game.junk = set([23, 12, 13, 14])
        game.table = [set([1, 2, 3, 4, 5]), set([8, 9, 10, 11, 7]), set([20, 21]), set([22])]
        game.hand = set([6, 15, 16, 17])
        self.assertEqual(game.choose(), 6)