npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

hrm-level-data

v1.1.3

Published

Human Resource Machine level data

Downloads

19

Readme

hrm-level-data

Human Resource Machine level data

Usage

Install with: npm install hrm-level-data

Then:

var levels = require("hrm-level-data");

levels will be an array of level objects.

An excerpt:

[{
    number: 1,
    name: "Mail Room",
    floor: {},
    instructions: "Drag commands into this area to build a program.\n\nYour program should tell your worker to grab each thing from the INBOX, and drop it into the OUTBOX.",
    commands: [ "INBOX", "OUTBOX" ],
    expect: [{
        inbox: [ 1, 9, 4 ],
        outbox: [ 1, 9, 4 ]
    }],
    challenge: {
        size: 6,
        speed: 6
    }
}, {
    ...
}, {
    number: 20,
    name: "Multiplication Workshop",
    instructions: "For each two things in the INBOX, multiply them, and OUTBOX the result. Don't worry about negative numbers for now.\n\nYou got... LABELS! They can help you remember the purpose of each tile on the floor. Just tap any tile on the floor to edit.",
    commands: [ "INBOX", "OUTBOX", "COPYFROM", "COPYTO", "ADD", "SUB", "BUMPUP", "BUMPDN", "JUMP", "JUMPZ", "JUMPN" ],
    comments: true,
    labels: true,
    floor: {
        columns: 5,
        rows: 2,
        tiles: { "9": 0 }
    },
    expect: [{
        inbox: [ 9, 4, 1, 7, 7, 0, 0, 8, 4, 2 ],
        outbox: [ 36, 7, 0, 0, 8 ]
    }],
    challenge: {
        size: 15,
        speed: 109
    }
}, {
    ...
}, {
    number: 34,
    name: "Vowel Incinerator",
    instructions: "Send everything from the INBOX to the OUTBOX, except the vowels.",
    commands: [ "INBOX", "OUTBOX", "COPYFROM", "COPYTO", "ADD", "SUB", "BUMPUP", "BUMPDN", "JUMP", "JUMPZ", "JUMPN" ],
    dereferencing: true,
    comments: true,
    labels: true,
    floor: {
        columns: 5,
        rows: 2,
        tiles: [ "A", "E", "I", "O", "U", 0 ]
    },
    expect: [{
        inbox: [ "C", "O", "D", "E", "U", "P", "L", "A", "K", "E" ],
        outbox: [ "C", "D", "P", "L", "K" ]
    }],
    challenge: {
        size: 13,
        speed: 323
    }
}, {
    ...
}]

Data Schema

The data is in the form of an array of level objects. Each level object has the following properties:

number

Number. The level number, as it appears in the game. Note that the level numbers are not sequential because there are cutscenes that take up level numbers. The first level is 1. The first cutscene, Coffee Time, takes up level 5, and so on.

name

String. The level name.

instructions

String. The instructions for the level.

commands

Array. The allowed commands for the program. Valid commands are "INBOX", "OUTBOX", "COPYFROM", "COPYTO", "ADD", "SUB", "BUMPUP", "BUMPDN", "JUMP", "JUMPZ" and "JUMPN".

dereferencing

Boolean. Optional. true if the [] operator can be used in the commands "COPYFROM", "COPYTO", "ADD", "SUB", "BUMPUP" and "BUMPDN". i.e. if floor tile values can be used to refer to indices for other floor tiles.

comments

Boolean. Optional. true if comments are allowed to be used in the program.

labels

Boolean. Optional. true if adding labels to floor tiles are allowed in the level.

floor

Object. Optional. The floor setup. Not defined if the level doesn't make use of the floor. Has the following properties:

columns

Number. The number of columns of the floor grid.

rows

Number. The number of rows of the floor grid.

tiles

Object/Array. Optional. The initial floor contents. Tile values can either be numbers (e.g. 5), strings for letters (e.g. "E") or null. Numbers are never represented as strings (e.g. "3" won't appear).

For sparse setups, this can be an object with keys as floor tile indices:

tiles: { "0": "A", "10": 4 } // "A" is on tile 0, 4 is on tile 10

For setups where every tile is occupied, this can be an array where indices are directly mapped to floor tiles:

tiles: ["A", "E", "I", "O", "U", 0]; // "A" is on tile 0, "E" is on tile 1, etc.

For setups where almost every tile is occupied, the unoccupied tiles can be represented with nulls:

tiles: ["N", "K", "A", "E", "R", "D", "O", "L", "Y", "J", null, null, 8];

expect

Array. The expected input/output combinations for different runs. Each is object with the following properties:

inbox

Array. The program input as it appears in the "IN" conveyor belt. The first item appears as the first item that will be picked up from the conveyor belt. In other words, it's FIFO.

outbox

Array. The expected program output as it will appear in the "OUT" conveyor belt. The first item needs to match what will be first placed on the conveyor belt. In other words, this is also FIFO.

challenge

Object. The criteria used for the game's size/speed challenges. Each is an object with the following properties:

size

Number. The maximum program size to meet the size challenge.

speed

Number. The maximum program run steps to meet the speed challenge.

Maintainers

License

MIT