Feature Creep 2026, 13 - Bookle (Title WIP) - Shuffler
The way our selector from last time around worked made stuff look like it's assembled from left to right and top to bottom, so in the end of the selector, we pick either 'r' for row or 'c' for column and shuffle whichever we land on around to make it look more random. Don't tell the end user.
def shuffler(grid):
char = random(['c', 'r'])
grid2 = Grid()
if char == 'r':
new_r = random.shuffle(["a", "b", "c"])
old_r = ["a", "b", "c"]
for i in range(0, 3):
for j in range(0, 3):
grid2[f'{old_r[i]}{j}'] = grid[f'{new_r[i]}{j}]
else:
new_c = random.shuffle(["1", "2", "3"])
old_c = ["1", "2", "3"]
for i in range(0, 3):
for j in range(0, 3):
grid2[f'{i}{old_c[j]}'] = grid[f'{i}{new_c[j]}]