Files
blitzkit/packages/website/src/stores/guess.ts
T
Mark Greene e4e92d76b4 Feature: tier XI compatibility
Prepares BlitzKit for tier XI tanks ahead of their release. Tier X was hardcoded as the maximum in the tank search filters, the guesser and the tech tree, and had no roman numeral beyond X.

- Added `XI` to `TIER_ROMAN_NUMERALS`
- Added an awaitable tier list derived from the highest tier in the tank definitions, so nothing changes until tier XI tanks exist
- Used it for the tank search tier filters and the guesser tier picker and defaults
- Made the tech tree check for successors instead of assuming tier X is the last tier

Fixes #302
2026-10-05 18:18:19 +13:00

32 lines
645 B
TypeScript

import type { TankDefinition } from "@blitzkit/core";
import { Varuna } from "varuna";
import { awaitableTiers } from "../core/awaitables/tiers";
const tiers = await awaitableTiers;
export enum GuessState {
Correct,
Incorrect,
NotGuessed,
}
export interface Guess {
tank: TankDefinition;
guessState: GuessState;
totalGuesses: number;
correctGuesses: number;
streak: number;
helpingReveal: boolean;
tiers: number[];
}
export const Guess = new Varuna<Guess, TankDefinition>((tank) => ({
tank,
guessState: GuessState.NotGuessed,
totalGuesses: 0,
correctGuesses: 0,
streak: 0,
helpingReveal: false,
tiers,
}));