Link class for the Mystery Master Logic Puzzle Solver.

Michael Benson

2024-12-20

Constructors

Properties

getVerb: LinkFunction
name: string
nounType: NounType
num: number
oneToOne: boolean = false
With: Link = null

Methods

  • Returns string

  • Returns void

  • Returns string

  • Returns positive verb if number for noun1 times n1 equals number for noun2 times n2, otherwise negative verb.

    Parameters

    • n1: number

      Number on left hand side.

    • n2: number

      Number on right hand side.

    Returns LinkFunction

    LinkFunction hasRatio.

  • Returns positive verb if the number for noun1 is exactly n less than the number for noun2, otherwise negative verb.

    Parameters

    • n: number

      Number.

    Returns LinkFunction

    LinkFunction isLessBy.

  • Returns positive verb if the number for noun1 is less than the number for noun2 minus n, otherwise negative verb. For n = 1, this means "before, but not just before."

    Parameters

    • n: number = 0

      Number.

    Returns LinkFunction

    LinkFunction isLessThan.

  • Returns positive verb if the number for noun1 is exactly n more than the number for noun2, otherwise negative verb.

    Parameters

    • n: number

      Number.

    Returns LinkFunction

    LinkFunction isMoreBy.

  • Returns positive verb if the number for noun1 is more than the number for noun2 plus n, otherwise negative verb. For n = 1, this means "after, but not just after."

    Parameters

    • n: number = 0

      Number.

    Returns LinkFunction

    LinkFunction isMoreThan.

  • Returns positive verb if number for noun1 is exactly 1 less or 1 more than number for noun2, otherwise negative verb.

    Returns LinkFunction

    LinkFunction isNextTo.

  • Returns positive verb if number for noun1 is exactly n less or n more than number for noun2, otherwise negative verb. Equivalent to isNextTo when n is one.

    Parameters

    • n: number

      Number.

    Returns LinkFunction

    LinkFunction isOffsetBy.

  • Returns positive verb if number for noun1 is either n less or n more than number for noun2, otherwise negative verb.

    Parameters

    • n: number

      Number.

    Returns LinkFunction

    LinkFunction isOutsideOf.

  • Returns positive verb if both nouns are equal (i.e., are the same noun), otherwise negative verb.

    Returns LinkFunction

    LinkFunction isWith.