oot-bingo-tools
TypeScript icon, indicating that this package has built-in type declarations

1.2.1 • Public • Published

OoT Bingo Tools

image

A library of functions to be used in combination with the oot-bingo-generator and oot-bingo-lists packages. It includes tools to analyze frequencies of goals, and differences between goal lists of Ocarina of Time Bingo.

Install

npm install --save oot-bingo-tools

Tools usage

Frequency analysis

async analyzeFrequencies(bingoList, numberOfBoards, mode = "normal", startSeed = 0, numberOfWorkers = 8, profile = undefined)

Perform a frequency analysis on a bingo version using analyzeFrequencies(). Specify how many boards it should generate, and it calculates how often goals occur on these boards. To make it faster, the board generation tasks are performed in parallel. Adjust the numberOfWorkers parameter to specify how many threads should be used. For the bingoList argument, you can either supply your own goal list, or import one from the oot-bingo-lists package. Note that the function is async, so it should be be awaited.

The function pretty prints the results, and returns an object containing the frequencies and a meta object with data about the generation process (like how many boards failed, the average iterations needed per board, etc).

Example

import { analyzeFrequencies } from 'oot-bingo-tools';
import { getBingoList } from 'oot-bingo-lists';

async function main() {
  const frequencyResult = await analyzeFrequencies(getBingoList("v10.4"), 1000, "normal");
}

main();

Changelog

printChangeLog(goalList1, goalList2)

Print the changelog containing all the changes between two bingo versions. The first argument should be the 'before' goal list, and the second argument the 'after'. You can either supply your own goal lists, or import existing ones from the oot-bingo-lists package. Note that you can't use combined goal lists as arguments.

Example

import { printChangeLog } from 'oot-bingo-tools';
import { getBingoList } from 'oot-bingo-lists';

printChangeLog(getBingoList("v10.3.2").normal, getBingoList("v10.4").normal);

Run source code directly

If you would like to run the source code directly rather than install this as a package, you can clone the repo and install the dependencies:

npm install

Tests

Run all tests:

npm test

Run

There is example code in sandbox/main.ts, demonstrating the usage of the bingo tools. Run it with:

npm start

Build

Create a build of the package outputted in the folder dist:

npm run build

Publish

Publish the package to NPM:

npm run prepare
npm publish

Readme

Keywords

Package Sidebar

Install

npm i oot-bingo-tools

Weekly Downloads

0

Version

1.2.1

License

GPL-3.0-only

Unpacked Size

61.1 kB

Total Files

11

Last publish

Collaborators

  • xwmtp