Class: PuzzleValidator

PuzzleValidator(f)

A validator that evaluates the whole puzzle

Constructor

new PuzzleValidator(f)

Parameters:
Name Type Description
f PuzzleCondition
Source:

Members

(static) DIFF_DELTA :number

The delta used to compare distances
Type:
  • number
Source:

Methods

(static) connected()

Source:

(static) equalDiffs(param0, param1) → {boolean}

Compares two pairs
Parameters:
Name Type Description
param0 Pair
param1 Pair
Source:
Returns:
Type
boolean

(static) relativeRefs(expected) → {PuzzleCondition}

Parameters:
Name Type Description
expected Array.<Pair> the expected relative refs
Source:
Returns:
Type
PuzzleCondition

isValid(puzzle)

Parameters:
Name Type Description
puzzle Puzzle
Source: