Skip to content

Commit

Permalink
Fix hashing row order
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanator committed Jul 3, 2017
1 parent 422a0ee commit 0702f10
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand All @@ -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))

0 comments on commit 0702f10

Please sign in to comment.