import { useState } from 'react' import { MAX_PLAYERS } from '../game/constants' import { Btn, Line } from './Crt' export function SetupScreen({ onStart, onBlip, }: { onStart: (names: string[]) => void onBlip: () => void }) { const [count, setCount] = useState(1) const [names, setNames] = useState(['', '', '', '']) const setName = (i: number, v: string) => setNames((prev) => prev.map((n, j) => (j === i ? v.slice(0, 12) : n))) return (
LEMONSVILLE BUSINESS LICENCE HOW MANY PEOPLE WILL PLAY?
{Array.from({ length: MAX_PLAYERS }, (_, i) => i + 1).map((n) => ( { onBlip() setCount(n) }} > {n} ))}
WHAT ARE THEIR NAMES? {Array.from({ length: count }, (_, i) => ( ))} EVERY STAND OPENS WITH $2.00 IN THE TIN.
onStart(names.slice(0, count))}> OPEN FOR BUSINESS
) }