2 Avatar Katas
2.1 Avatar 1 Kata (difficulty = 1)
read
Code a game with a fast wizard avatar.
code
#lang adventure (adventure-game #:avatar (basic-avatar #:sprite wizard-sprite #:speed 20))
2.2 Avatar 2 Kata (difficulty = 1)
read
Code a game with a fast, strong pirate avatar.
code
#lang adventure (define (my-avatar) (basic-avatar #:sprite pirate-sprite #:speed 20 #:health 200 #:max-health 200)) (adventure-game #:avatar (my-avatar))
2.3 Avatar 3 Kata (difficulty = 1)
Tip: The default speed is 10.
read
Code a game with a fast avatar and an intro cutscene. Customize the cutscene to have a sprite and some text.
code
#lang adventure (adventure-game #:avatar (basic-avatar #:sprite pirategirl-sprite #:speed 20) #:intro-cutscene (basic-cutscene (page pirategirl-sprite "This is the story of" "Jordan the Pirate.")))
2.4 Avatar 4 Kata (difficulty = 2)
read
Code a game with an avatar and an intro cutscene. Customize the cutscene with 2 pages, include sprites and text.
code
#lang adventure (adventure-game #:avatar (basic-avatar #:sprite madscientist-sprite) #:intro-cutscene (basic-cutscene (page "A long time ago," "In a place far, far, away...") (page (set-sprite-scale 2 madscientist-sprite) "There was a mad scientist" "named Dr. Horrible.")))