Lemonade Stand: browser recreation of the Atari 8-bit BASIC game

Faithful day loop - weather report, cost of lemonade rising over the
summer, glasses/signs/price decisions, thunderstorms, heat waves and
street crews - with the $$ LEMONSVILLE DAILY FINANCIAL REPORT $$ laid
out the way it printed.

The simulation is kept out of React so a season can be run headlessly:
a careful player compounds $2.00 into roughly $22 over twelve days,
while an all-in player goes broke about seven times in ten.

Weather scenes are pixel rectangles in SVG and the music is a small
chiptune engine on the Web Audio API, so there are no binary assets.
The screen is locked to a 4:3 tube and never scrolls.
This commit is contained in:
2026-09-08 15:23:46 -07:00
commit 5f8ad511f0
32 changed files with 3913 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
/** 4x5 block letters, drawn the way you would on graph paper. */
const GLYPHS: Record<string, string[]> = {
L: ['#...', '#...', '#...', '#...', '####'],
E: ['####', '#...', '###.', '#...', '####'],
M: ['#..#', '####', '####', '#..#', '#..#'],
O: ['####', '#..#', '#..#', '#..#', '####'],
N: ['#..#', '##.#', '#.##', '#..#', '#..#'],
A: ['####', '#..#', '####', '#..#', '#..#'],
D: ['###.', '#..#', '#..#', '#..#', '###.'],
S: ['####', '#...', '####', '...#', '####'],
T: ['####', '.#..', '.#..', '.#..', '.#..'],
' ': ['....', '....', '....', '....', '....'],
}
export function bannerRows(word: string): string[] {
const rows = ['', '', '', '', '']
for (const ch of word.toUpperCase()) {
const g = GLYPHS[ch] ?? GLYPHS[' ']
for (let r = 0; r < 5; r++) rows[r] += (rows[r] ? ' ' : '') + g[r]
}
return rows.map((r) => r.replace(/#/g, '█').replace(/\./g, ' '))
}