Something went wrong. Try again.
a tiny pet with a GPT-2 brain, living in your browser
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152import type { Action, Config, Stage } from "../types.ts";import { DAY, HOUR } from "./utils.ts";const element = document.getElementById("pet-config");if (!element?.textContent) throw new Error("Missing #pet-config JSON configuration");export const CFG: Config = JSON.parse(element.textContent);export const DEBUG = new URLSearchParams(location.search).get("debug") === "1" || location.hash.slice(1) === "debug";export { DAY, HOUR, MIN } from "./utils.ts";export const WANT_ICON: Record<string, string> = { snack: "cookie", play: "ball", bath: "bubbles", sleep: "moon", pats: "heart", medicine: "pill",};export const OFFER_ICON: Record<string, string> = { bath: "bubbles", medicine: "pill", play: "ball",};export const NAME_IDEAS = [ "Mochi", "Pip", "Bean", "Tofu", "Nori", "Puddle", "Sprout", "Pebble", "Momo", "Kiwi", "Dumpling", "Boba", "Miso", "Clover", "Noodle", "Gumdrop", "Yuzu", "Biscuit", "Fig", "Bun",];export const STAGE_AGE: [Stage, number][] = [ ["adult", 5 * DAY], ["teen", 2 * DAY], ["kid", 12 * HOUR], ["baby", 0],];export const FEATURE_TEXT: Record<string, string> = {};export const ACT_NEEDS: Partial<Record<Action, string>> = {};