2 Avatar Katas
2.1 Avatar Kata (difficulty = 1)
read
Code a game with a basic avatar.
code
#lang survival (survival-game #:avatar (basic-avatar))
2.2 Avatar Kata (difficulty = 1)
read
Code a game with an avatar that has a custom sprite.
code
#lang survival (survival-game #:avatar (basic-avatar #:sprite wizard-sprite))
2.3 Avatar Kata (difficulty = 1)
Tip: The default speed is 10.
read
Code a game with an avatar that has a custom sprite and speed.
code
#lang survival (define (my-avatar) (basic-avatar #:sprite pirate-sprite #:speed 20)) (survival-game #:avatar (my-avatar))
2.4 Avatar Kata (difficulty = 1)
Tip: The default key-mode is ’arrow-keys.
read
Code a game with an avatar that has a custom sprite, speed and WASD key-mode.
code
#lang survival (define (my-avatar) (basic-avatar #:sprite monk-sprite #:speed 20 #:key-mode 'wasd)) (survival-game #:avatar (my-avatar))
2.5 Avatar Kata (difficulty = 1)
read
Code a game with an avatar that has a custom sprite, speed, WASD key-mode, and 200 health and max-health.
code
#lang survival (define (my-avatar) (basic-avatar #:sprite wizard-sprite #:speed 20 #:key-mode 'wasd #:health 200 #:max-health 200)) (survival-game #:avatar (my-avatar))