Options
All
  • Public
  • Public/Protected
  • All
Menu

Loner class for the Mystery Master Logic Puzzle Solver. The finder makes assumptions to place the loners. Strategy: a. Assume loner (noun1) is with noun2 of type2. b. On each attempt, n2 is incremented to give the one-based number of noun2. c. If the loner cannot be placed, the previous assumption is undone, d. and placement resumes with the previous loner.

Hierarchy

  • Loner

Index

Constructors

Properties

Methods

Constructors

constructor

  • Parameters

    Returns Loner

Properties

count

count: number

n2

n2: number

noun1

noun1: Noun

type2

type2: NounType

Methods

Static getLoners

  • Initializes loners array. Adds nouns of type1 that are not with a noun of type2, t1 != t2, to the loners array. The tuples are sorted to try to minimize the number of assumptions.

    Parameters

    • solver: Solver

      Solver object.

    • puzzle: Puzzle

      Puzzle object.

    Returns Loner[]

    Array of Loner objects.

Static sayLoners

  • sayLoners(loners: Loner[]): void
  • Displays each loner in the given array of loners.

    Parameters

    • loners: Loner[]

      Array of loners.

    Returns void

Generated using TypeDoc