Example #1
0
    def test_generate_complete(self):
        grid = Grid(3)
        grid.init_generate_grid()

        # self.assertEqual(len(grid.grid), 36)
        grid.simple_show()
        grid.show_detail()

        grid.check_eliminate()
        for state in grid.direct_states:
            print(state, grid.direct_states[state])
Example #2
0
    def test_check(self):
        grid = Grid(1)
        grid.init_generate_grid()

        grid.show_detail()
        print('数量统计', grid.type_count)

        grid.check_eliminate()

        for state in grid.direct_states:
            print(state, grid.direct_states[state])
Example #3
0
    def test_probably(self):
        grid = Grid(2)
        grid.init_generate_grid()

        grid.simple_show()

        grid.check_eliminate()
        for state in grid.probably_eliminate:
            state_list = grid.probably_eliminate[state]
            for cell in state_list:
                print(cell.direct_type, cell.ref_id, cell.get_pre(grid),
                      cell.indexes, cell.get_next(grid))