On this page:
6.1 Biome Kata (difficulty = 3)
6.2 Sky Kata (difficulty = 1)
6.3 Sky Kata (difficulty = 1)
6.4 Sky Kata (difficulty = 1)
6.5 Sky Kata (difficulty = 3)

6 Biome & Sky Katas

6.1 Biome Kata (difficulty = 3)

read
Code a game with a lava background with a 2 by 2 grid that starts on tile 3.
code
#lang survival-minecraft
 
(define (my-biome)
   (basic-biome
    #:image LAVA-BG
    #:rows 2
    #:columns 2
    #:start-tile 3
    #:hd? #t))
 
(minecraft-game #:biome (my-biome))

6.2 Sky Kata (difficulty = 1)

Tip: By default, the length-of-day will be 2400.

read
Code a game with a very long day/night cycle.
code
#lang survival-minecraft
 
(minecraft-game
  #:sky (basic-sky #:length-of-day 5000))

6.3 Sky Kata (difficulty = 1)

Tip: Here is a link to all available colors: colors.

read
Code a game with a custom-colored night sky.
code
#lang survival-minecraft
 
(minecraft-game
  #:sky (basic-sky #:night-sky-color 'darkmagenta))

6.4 Sky Kata (difficulty = 1)

Tip: Max darkness takes a value between 0 (no darkness) and 255 (total blackout).

read
Code a game with a short day/night cycle where it gets pitch-black at midnight.
code
#lang survival-minecraft
 
(minecraft-game
  #:sky (basic-sky
   #:length-of-day 500
   #:max-darkness 255))

6.5 Sky Kata (difficulty = 3)

read
Code a game with a short night, and many nocturnal mobs.
code
#lang survival-minecraft
 
(minecraft-game
  #:mob-list (list
   (basic-mob
    #:amount-in-world 20
    #:night-only? #t))
  #:sky (basic-sky
   #:length-of-day 2400
   #:start-of-daytime 200
   #:end-of-daytime 2200))