#lang racket

(require "challenge.rkt")

(provide challenges)

;This file contains the challenges of the platform
;Make sure the id's are incremental, starting from 0 and correspond to the challenges displayed on the platform
;VERY IMPORTANT: NEVER ALLOW STATE! If state is allowed e.g. through set! it can be abused to simply hardcode the output
;I also recommend making the first challenge a sanity check for instance by having the input and output be the same

(define variable-names
  '(a b c d e f g h i j k l m n o p q r s t u v w x y z))

(define challenges
  (list
    (make-challenge
      0
      "This challenge is the sanity check! Try writing a lambda that adds one to its argument. If you're stuck on this one, ask one of the organisers for help."
      "IGCTF{YouPassedTheSanityCheck!}"
      (list 1 2 3 4 5 6 7 8 9 10)
      (list 2 3 4 5 6 7 8 9 10 11)
      `(,@(take variable-names 1) + lambda))
    (make-challenge
      1
      "The Collatz conjecture states that if you apply the following operation on a number n repeatedly, you eventually end up with the number 1. If n is even, divide it by two, if n is odd multiply it by 3 and add 1. Write a function that counts how many iterations it takes to reach 1, starting from the given input."
      "IGCTF{TJMtKPpKsQNRHkUmricn}"
      (list 5 19 18 12345678 1337 27 42 1010101 437)
      (list 5 20 20 228 44 111 8 152 115)
      `(,@(take variable-names 5) define lambda begin if - + * / zero? even? odd?))
    (make-challenge
      2
      "Same as the previous challenge. But you don't need bloat such as * and / right? I'm also taking a variable from you, because I can."
      "IGCTF{KMCxgtSxUqwVuZbqQZkg}"
      (list 5 19 18 1337 27 42 1010101 437)
      (list 5 20 20 44 111 8 152 115)
      `(,@(take variable-names 4) define lambda begin if - + zero? even? odd?))
    (make-challenge
      3
      "This is the real challenge. Let's see if you truly understand the power of lambda. Also, I'm stealing another variable."
      "IGCTF{MEzFXubIUSRRLYQuJfdm}"
      (list 5 19 18 12345678 1337 27 42 1010101 437)
      (list 5 20 20 228 44 111 8 152 115)
      `(,@(take variable-names 3) lambda if - + * / zero? even? odd?))))
