コード例 #1
0
    def test_game_is_not_closed_if_no_suits_at_ends(self):
        state = DominoState( 1,{
            'tiles_by_player':[
                [{4, 6}, {5,3}], 
                [{3, 5}], 
                [{4} ], 
                [{4,1}]
                ],
            'suits_at_ends':set()
        })

        self.assertFalse(state._game_is_closed())
コード例 #2
0
    def test_game_is_closed(self):
        state = DominoState( 1,{
            'tiles_by_player':[
                [{4, 6}, {5,3}], 
                [{3, 5}], 
                [{4} ], 
                [{4,1}]
                ],
            'suits_at_ends':{2}
        })

        self.assertTrue(state._game_is_closed())