From 0a5e097ede3fa2949c73674218dac0737210e5d0 Mon Sep 17 00:00:00 2001 From: Aeva Palecek Date: Sat, 17 Dec 2016 01:39:46 -0600 Subject: [PATCH] DotGraalParser board generation seems to be correct now. Removed the weird interlacing scheme that NW had, and now test.graal renders correctly. Relates to issue #12. --- graal_parser.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/graal_parser.py b/graal_parser.py index 4801106..68498ce 100644 --- a/graal_parser.py +++ b/graal_parser.py @@ -104,11 +104,8 @@ def get_packet(bit_index): tile = tiles[di] y = int(math.floor(di/64.0)) x = di%64 - # the following is wrong, but sorta works: - tx = di % 16 - ty = di / 16 - bx = ty / 32 * 16 + tx - by = ty % 32 + bx = y / 32 * 16 + x + by = y % 32 self.board[x][y] = (bx, by)