re-arrange condition, add license to __init__
This commit is contained in:
parent
6e61f0003b
commit
4f2193e3c5
2 changed files with 4 additions and 1 deletions
|
|
@ -0,0 +1,3 @@
|
|||
# SPDX-FileCopyrightText: 2024 Tim Cocks for Adafruit Industries
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue