Example ZenCode scripting engine.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011
  1. var correct = false;
  2. while !correct {
  3. val value = randomInt(10);
  4. val guess = readLine("Guess a number 0-9: ");
  5. if value == int.parse(guess) {
  6. println("You were right!");
  7. correct = true;
  8. } else {
  9. println("Nope, try again...");
  10. }
  11. }