Commit fdafebe1 authored by Kento HASEGAWA's avatar Kento HASEGAWA

Fix a bug in the board size of a split group

parent 12515c87
...@@ -116,8 +116,9 @@ class Problem(object): ...@@ -116,8 +116,9 @@ class Problem(object):
block_text += '\n' block_text += '\n'
# board_xy = math.ceil(2 * math.sqrt(num_tiles)) # board_xy = math.ceil(2 * math.sqrt(num_tiles))
board_xy = math.ceil(3 * math.sqrt(num_tiles)) group_x = min(math.ceil(3 * math.sqrt(num_tiles)), self.size[0])
problem_text += f'SIZE {board_xy}X{board_xy}\n' 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 += f'BLOCK_NUM {len(g)}\n'
problem_text += '\n' problem_text += '\n'
problem_text += block_text problem_text += block_text
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment