Commit fdafebe1 authored by Kento HASEGAWA's avatar Kento HASEGAWA
Browse files

Fix a bug in the board size of a split group

parent 12515c87
Loading
Loading
Loading
Loading
+3 −2
Changes for utils/data.py: 3 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -116,8 +116,9 @@ class Problem(object):
                block_text += '\n'
            
            # board_xy = math.ceil(2 * math.sqrt(num_tiles))
            board_xy = math.ceil(3 * math.sqrt(num_tiles))
            problem_text += f'SIZE {board_xy}X{board_xy}\n'
            group_x = min(math.ceil(3 * math.sqrt(num_tiles)), self.size[0])
            group_y = min(math.ceil(3 * math.sqrt(num_tiles)), self.size[1])
            problem_text += f'SIZE {group_x}X{group_y}\n'
            problem_text += f'BLOCK_NUM {len(g)}\n'
            problem_text += '\n'
            problem_text += block_text