moth/example-puzzles/example/5/puzzle.md

1.9 KiB
Raw Permalink Blame History

authors scripts answers debug
neale
filename
helpers.js
filename
draggable.js
helper
summary
Using JavaScript Input Helpers

MOTH only takes static answers: you can't, for instance, write code to check answer correctness. But you can provide as many correct answers as you like in a single puzzle.

This page has an associated helpers.js script you can include to assist with input formatting, so people aren't confused about how to enter an answer.

You could also write your own JavaScript to validate things.

This is just a demonstration page. You will probably only want one of these in a page, to avoid confusing people.

RFC3339 Timestamp

All lower-case letters

Multiple concatenated values

Free input, sorted, concatenated values

  • <l/i>

User-draggable values

Select from an ordered list of options

  • Horns
  • Hooves
  • Antlers

Substring matches

Any substring

Only if at the beginning

Only if at the end