https://github.com/apollozhu/swifty-karel
Redesigned Karel that is really "Swifty", [Accepted] WWDC17 Scholarship Submission
https://github.com/apollozhu/swifty-karel
apple cs106a karel swift swift-playgrounds wwdc wwdc-2017 wwdc-scholarship wwdc-scholarship-submissions wwdc-scholarship-winner wwdc17 wwdc2017 wwdcscholars
Last synced: 18 days ago
JSON representation
Redesigned Karel that is really "Swifty", [Accepted] WWDC17 Scholarship Submission
- Host: GitHub
- URL: https://github.com/apollozhu/swifty-karel
- Owner: ApolloZhu
- License: apache-2.0
- Created: 2016-10-10T16:33:09.000Z (over 8 years ago)
- Default Branch: dev
- Last Pushed: 2020-05-06T10:43:05.000Z (almost 5 years ago)
- Last Synced: 2025-03-24T01:14:05.776Z (about 1 month ago)
- Topics: apple, cs106a, karel, swift, swift-playgrounds, wwdc, wwdc-2017, wwdc-scholarship, wwdc-scholarship-submissions, wwdc-scholarship-winner, wwdc17, wwdc2017, wwdcscholars
- Language: Swift
- Homepage:
- Size: 7.79 MB
- Stars: 12
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
> Tell us about the features and technologies you used in your Swift playground.
"Swifty Karel" is inspired by the Karel robot form Stanford University. By giving Karel commands through global functions, it can explore the "world". It is very similar to the lectures provided within Swift Playgrounds on iPad, but in 2D.
The project is highly customizable. The Playground class is implemented as a Singleton, and it contains
Depending on whether or not animation is on Karel itself, `UIView` animation will be preformed, or a scheduled timer will fire after certain delay. The project is playing background music through `AVFoudation`, handled by an lazily initialized player.
Technically, this project used a lot of language features of Swift. Using weak references in escaping trailing closures to avoid ARC issue. By encapsulating common operations and functional programming, the code is organized.
By conforming to `CustomPlaygroundQuicklookable`, even an abstract model can be elegantly shown to the user.
Also, to make the playground itself appealing, Playground/Xcode markup language is used to as guide to users.
