diff options
Diffstat (limited to 'configs/gen_corners.py')
-rw-r--r-- | configs/gen_corners.py | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/configs/gen_corners.py b/configs/gen_corners.py deleted file mode 100644 index e1f5701..0000000 --- a/configs/gen_corners.py +++ /dev/null @@ -1,36 +0,0 @@ -import json - -import sys # hacky way to import utils for now -sys.path.append("..") -from utils import rgb_to_hex - - -corner_shape = [ # giving all 4 corners have the same shape - [0, 0, 0, 0], - [0, 1, 1, 0], - [0, 1, 1, 0], - [0, 0, 0, 0], -] - -center_color = [0, 0, 0] -corner_colors = { # assuming each corner will only have two colors (center_color and a corner-specific color) - 0: [255, 0, 0], - 1: [0, 255, 0], - 2: [0, 0, 255], - 3: [255, 255, 255,] -} - -center_color = rgb_to_hex(center_color) -corner_colors = {key: rgb_to_hex(val) for key, val in corner_colors.items()} - -corner_colored_shapes = { - corner_ind: [[corner_color if cell else center_color for cell in row] for row in corner_shape] - for corner_ind, corner_color in corner_colors.items() -} - -with open("corners_hollow4x4_v0.json", "w") as f: - json.dump({ - "corner_colors": corner_colored_shapes, - "corner_width": len(corner_shape[0]), - "corner_height": len(corner_shape), - }, f) |