Reference · Pipes, rules and solving
exactScoreOffunction
The score of a measure against a reference set before it is rounded, from 1 to 100: what boards are put in order by, so that two boards of one whole score still have an order.
Import it
import { exactScoreOf } from "@johnmorrisdotca/suido";
Definition
function exactScoreOf(measure: Measure, reference: Reference): number
Parameters
| Name | Type | Description |
|---|---|---|
measure | Measure | The measured puzzle difficulty features. |
reference | Reference | The matching size, kind and wrap reference quantiles. |
Returns
number
The score of a measure against a reference set before it is rounded, from 1 to 100: what boards are put in order by, so that two boards of one whole score still have an order.
Examples
import { SUIDO_5X5 } from "@johnmorrisdotca/suido/levels-5x5";
import { decodeLayout, exactScoreOf, measureSuido, referenceFor } from "@johnmorrisdotca/suido";
import { levelSolution } from "@johnmorrisdotca/suido/levels";
const row = SUIDO_5X5[0];
const code = row[0];
const layout = decodeLayout(code)!;
const solution = levelSolution(row)!;
const measure = measureSuido(layout,solution);
const reference = referenceFor(layout);
console.log(exactScoreOf(measure,reference));1.5597905759162303What it prints (run when this page was built)