From 0702f1018a7469eb9855d62f54f34a4a39e0b4e2 Mon Sep 17 00:00:00 2001 From: brendanator Date: Mon, 3 Jul 2017 23:11:54 +0100 Subject: [PATCH] Fix hashing row order --- consts.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/consts.py b/consts.py index 578ed0d..27596c1 100644 --- a/consts.py +++ b/consts.py @@ -77,7 +77,7 @@ row_hash = disks_in_column | yellow_disks for column in range(WIDTH): row_column_hash = row_hash << (9 * column) - DISK_HASHES[colour, row, column] = row_column_hash + DISK_HASHES[colour, HEIGHT - row - 1, column] = row_column_hash if __name__ == '__main__': print(FOURS[0]) @@ -88,4 +88,4 @@ print(ROW_EDGE_DISTANCE.reshape([HEIGHT, WIDTH])) print(COLUMN_EDGE_DISTANCE.reshape([HEIGHT, WIDTH])) print(ODDS.reshape([HEIGHT, WIDTH])) - print(DISK_HASHES) + print(np.array(map(bin, DISK_HASHES.flatten())).reshape(DISK_HASHES.shape))