Skip to content

Commit 4f2193e

Browse files
committed
re-arrange condition, add license to __init__
1 parent 6e61f00 commit 4f2193e

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# SPDX-FileCopyrightText: 2024 Tim Cocks for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: MIT

CircuitPython_Karel_The_Robot/karel/circuitpythonkarel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ def turn_left():
271271

272272
def corner_is_blocked(corner_x, corner_y):
273273
corner_loc = [corner_x, corner_y]
274-
if 0 > corner_loc[0] or 0 > corner_loc[1]:
274+
if corner_loc[0] < 0 or corner_loc[1] < 0:
275275
return True
276276

277277
if corner_loc[0] >= world.world_width or corner_loc[1] >= world.world_height:

0 commit comments

Comments
 (0)