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.

Constructors

Properties

Methods

Constructors

Properties

count: number
n2: number
noun1: Noun
type2: NounType

Methods

  • 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

    Returns Loner[]

    Array of Loner objects.

  • Displays each loner in the given array of loners.

    Parameters

    • loners: Loner[]

      Array of loners.

    Returns void