re-arrange condition, add license to __init__

This commit is contained in:
foamyguy 2024-12-17 09:27:27 -06:00
parent 6e61f0003b
commit 4f2193e3c5
2 changed files with 4 additions and 1 deletions

View file

@ -0,0 +1,3 @@
# SPDX-FileCopyrightText: 2024 Tim Cocks for Adafruit Industries
#
# SPDX-License-Identifier: MIT

View file

@ -271,7 +271,7 @@ def turn_left():
def corner_is_blocked(corner_x, corner_y):
corner_loc = [corner_x, corner_y]
if 0 > corner_loc[0] or 0 > corner_loc[1]:
if corner_loc[0] < 0 or corner_loc[1] < 0:
return True
if corner_loc[0] >= world.world_width or corner_loc[1] >= world.world_height: