diff options
author | Olivier Gayot <olivier.gayot@sigexec.com> | 2020-12-21 23:19:49 +0100 |
---|---|---|
committer | Olivier Gayot <olivier.gayot@sigexec.com> | 2020-12-21 23:20:02 +0100 |
commit | 3ca5ab7806b36393244bf42edabf42f4e28fecfa (patch) | |
tree | 688cf60e3234508d4877a2019a3a24db2c82c797 /cameltris.py | |
parent | 7731757991d9a09053403ba2a529448a196cabfe (diff) |
Fix intentional use of negative indexing
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
Diffstat (limited to 'cameltris.py')
-rwxr-xr-x | cameltris.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cameltris.py b/cameltris.py index b0c78e1..60f8aee 100755 --- a/cameltris.py +++ b/cameltris.py @@ -109,6 +109,9 @@ def has_collision(y: int, x: int) -> bool: if element is None: continue + if row_id + y < 0: + continue + if col_id + x < 0: return True |