From c21660de843d0082f5fd1e5a4d3927f52ecb106e Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Sat, 13 Nov 2021 16:51:19 +0100 Subject: Make sure offsets are integers, not floating point numbers Signed-off-by: Olivier Gayot --- cameltris/player.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cameltris') diff --git a/cameltris/player.py b/cameltris/player.py index aee2d58..90eb2db 100644 --- a/cameltris/player.py +++ b/cameltris/player.py @@ -214,8 +214,8 @@ class Player: if element is not None: non_empty_cols.add(col_id) - y_offset = (4 - len(non_empty_rows)) / 2 - x_offset = (4 - len(non_empty_cols)) / 2 + y_offset = (4 - len(non_empty_rows)) // 2 + x_offset = (4 - len(non_empty_cols)) // 2 # Display the next piece for row_idx, row in enumerate(non_empty_rows): -- cgit v1.2.3