Skip to content

Commit

Permalink
re-arrange condition, add license to __init__
Browse files Browse the repository at this point in the history
  • Loading branch information
FoamyGuy committed Dec 17, 2024
1 parent 6e61f00 commit 4f2193e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CircuitPython_Karel_The_Robot/karel/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# SPDX-FileCopyrightText: 2024 Tim Cocks for Adafruit Industries
#
# SPDX-License-Identifier: MIT
2 changes: 1 addition & 1 deletion CircuitPython_Karel_The_Robot/karel/circuitpythonkarel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 4f2193e

Please sign in to comment.