Ejemplo n.º 1
0
    def setUp(self):
        self.p = GinPlayer()
        self.obs = Observer(self.p)
        self.obs2 = Observer(self.p)

        self.c1 = GinCard(9, 'c')
        self.c2 = GinCard(5, 'd')
Ejemplo n.º 2
0
 def test_get_value_by_index(self):
     # draw a few cards and ensure we can get the ith card's ranking
     cards = [GinCard(2, 'd'), GinCard(3, 'h'), GinCard(5, 'c')]
     for i in range(3):
         self.p._add_card(cards[i])
         self.assertEqual(self.obs.get_value_by_index(i),
                          self.p.hand.cards[i].ranking())
Ejemplo n.º 3
0
 def setUp(self):
     self.c1 = GinCard(9, 'c')
     self.c2 = GinCard(5, 'd')
     self.p = GinPlayer()