Add intro screen, win/loss art, and a way to abandon the ritual
- Adds a full-screen intro/title screen (new 'intro' game phase) with a moody Malmö/Turning Torso background and a "Börja ritualen" button; the game no longer starts ticking until the player begins. - Win and loss overlays now show matching generated artwork behind the existing text, instead of a flat scrim. - New "Avbryt" header button lets the player abandon a run mid-game (with a confirm prompt) via a new 'abandoned' phase, reusing the existing overlay/restart flow. - Source images converted from PNG (~2.1MB each) to WebP (~120KB each) and placed under public/img/ so Vite serves them as-is. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
import { describe, it, expect, afterEach } from 'vitest';
|
||||
import { createState, tick, buyUpgrade, type State } from './engine.ts';
|
||||
import { createState as createIntroState, startGame, tick, buyUpgrade, type State } from './engine.ts';
|
||||
|
||||
function createState(): State {
|
||||
return startGame(createIntroState());
|
||||
}
|
||||
import { UPGRADES } from './upgrades.ts';
|
||||
|
||||
// Deterministic PRNG so simulation tests aren't flaky, but still exercise
|
||||
|
||||
Reference in New Issue
Block a user