-
Notifications
You must be signed in to change notification settings - Fork 776
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cleanup, format, pylint. update spritesheet. add stuff to code.py
- Loading branch information
Showing
3 changed files
with
104 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,36 @@ | ||
# SPDX-FileCopyrightText: 2024 Tim Cocks for Adafruit Industries | ||
# | ||
# SPDX-License-Identifier: MIT | ||
""" | ||
Karel the Robot code.py for devices with built-in display available | ||
at board.DISPLAY. | ||
""" | ||
# pylint: disable=wildcard-import, unused-wildcard-import | ||
from karel.circuitpythonkarel import * | ||
|
||
|
||
# load a chapter. Edit the chapter filename to change chapters | ||
# see available chapter files in chapters/ directory. | ||
chapter_data = load_state_file("chapters/karel_ch01.json") | ||
|
||
|
||
def main(): | ||
""" | ||
Karel main() function declaration. | ||
Put your code for Karel into this function. | ||
""" | ||
## START OF MAIN FUNCTION, YOUR CODE GOES BELOW HERE ## | ||
|
||
|
||
|
||
## END OF MAIN FUNCTION, YOUR CODE GOES ABOVE HERE ## | ||
print(f"Goal state reached? {world.check_goal_state(chapter_data)}") | ||
|
||
|
||
# call the main() function | ||
main() | ||
|
||
ch_obj = load_state_file("chapters/karel_ch04.json") | ||
# Run forever so that the ending state of Karel and the world | ||
# remains visible on the display. | ||
while True: | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.