Puzzle

final class Puzzle : Model, @unchecked Sendable

A Puzzle is a member of a hunt which has an answer. It may also have hints which are shown but not stored if

Properties

  • id

    The puzzle’s ID.

    Declaration

    Swift

    @Puzzle
    .ID var id: UUID? { get set }
  • The title of the puzzle.

    Declaration

    Swift

    @Puzzle
    .Field var title: String { get set }
  • The body of the puzzle.

    Declaration

    Swift

    @Puzzle
    .Field var body: String { get set }
  • The answer to the puzzle.

    Declaration

    Swift

    @Puzzle
    .Field var answer: String { get set }
  • Strings that are not the answer, but which yield a helpful response. required, but can be empty.

    Declaration

    Swift

    @Puzzle
    .Field var hints: [String : String] { get set }
  • The time at which the puzzle unlocks. If unset, treated as the dawn of time.

    Declaration

    Swift

    @Puzzle
    .OptionalField var unlockTime: Date? { get set }

Relations

  • The Hunt to which the puzzle belongs.

    Declaration

    Swift

    @Puzzle
    .Parent var hunt: Hunt { get set }
  • Attempts to answer the puzzle. But you’ll probably never load them in this direction.

    Declaration

    Swift

    @Puzzle
    .Children var callIns: [PuzzleCallIn] { get set }

Initialization