14 lines
367 B
TypeScript
14 lines
367 B
TypeScript
import { useGameState } from './hooks/useGameState';
|
|
import StartScreen from './components/StartScreen';
|
|
import GameScreen from './components/GameScreen';
|
|
|
|
export default function App() {
|
|
const game = useGameState();
|
|
|
|
if (game.phase === 'menu') {
|
|
return <StartScreen onStart={(mode) => game.startGame(1, mode)} />;
|
|
}
|
|
|
|
return <GameScreen game={game} />;
|
|
}
|