示例#1
0
    def test_with_belote_on_all_trumps_should_only_one_stay(self):
        p1, p2, p3, p4 = Player(name='ime1'), Player(name='ime2'),\
         Player(name='ime3'), Player(name='ime4')
        t1, t2 = Team('prqkor1', p1, p3), Team('prqkor2', p2, p4)
        r = Round(1, t1, t2)
        p1.announcements = {BELOTE_BELOTE_STRING: ['h', 's', 'c', 'd']}
        r.trumps = 'at'

        r.check_belote(p1)

        self.assertEqual(len(p1.announcements[BELOTE_BELOTE_STRING]), 1)
示例#2
0
    def test_with_belote_not_on_trump_should_go_away(self):
        p1, p2, p3, p4 = Player(name='ime1'), Player(name='ime2'),\
         Player(name='ime3'), Player(name='ime4')
        t1, t2 = Team('prqkor1', p1, p3), Team('prqkor2', p2, p4)
        r = Round(1, t1, t2)
        p1.announcements = {BELOTE_BELOTE_STRING: ['h']}
        r.trumps = 's'

        r.check_belote(p1)

        self.assertEqual(p1.announcements, {BELOTE_BELOTE_STRING: []})