diff options
author | Olivier Gayot <olivier.gayot@sigexec.com> | 2021-11-13 16:51:19 +0100 |
---|---|---|
committer | Olivier Gayot <olivier.gayot@sigexec.com> | 2021-11-13 16:51:37 +0100 |
commit | c21660de843d0082f5fd1e5a4d3927f52ecb106e (patch) | |
tree | c00bd13d121289f3530846faca51ad79e0d9d648 /cameltris | |
parent | c60627d4833ad62e4c0dfd185360aaf54066b300 (diff) |
Make sure offsets are integers, not floating point numbers
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
Diffstat (limited to 'cameltris')
-rw-r--r-- | cameltris/player.py | 4 |
1 files changed, 2 insertions, 2 deletions
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): |