Ejemplo n.º 1
0
    def test_get_shuffle_coeffs_1(self):
        # arrange
        d = SpaceDeck(10)
        deals = [
            'deal with increment 7', 'deal into new stack',
            'deal into new stack'
        ]
        result = []

        # act
        coeffs = d.GetShuffleCoeffs()

        # assert
        self.assertEqual(coeffs, (7, 0))
Ejemplo n.º 2
0
    def test_get_shuffle_coeffs_4(self):
        # arrange
        d = SpaceDeck(10)
        deals = [
            'deal into new stack', 'cut -2', 'deal with increment 7', 'cut 8',
            'cut -4', 'deal with increment 7', 'cut 3',
            'deal with increment 9', 'deal with increment 3', 'cut -1'
        ]
        coeffList = [(-1, -1), (1, 2), (7, 0), (1, -8), (1, 4), (7, 0),
                     (1, -3), (9, 0), (3, 0), (1, 1)]

        # act
        d.RunDeal(deals)
        coeffs = list(d.coefficients)
        result = d.GetShuffleCoeffs()

        # assert
        self.assertEqual(coeffs, coeffList)