Gamified synth learning inspired by Turing Complete. Progressive puzzle system teaches oscillators, waveforms, frequency, and mixing through hands-on module patching. Includes world map, level progression with 3-star rating, target audio playback, solution validation, and localStorage persistence. Sandbox mode still accessible via button. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
18 lines
487 B
JavaScript
18 lines
487 B
JavaScript
import React, { useState } from 'react';
|
|
import { createRoot } from 'react-dom/client';
|
|
import App from './App';
|
|
import GameApp from './game/GameApp.jsx';
|
|
import './index.css';
|
|
|
|
function Root() {
|
|
const [mode, setMode] = useState('game'); // 'game' | 'sandbox'
|
|
|
|
if (mode === 'sandbox') {
|
|
return <App onSwitchToGame={() => setMode('game')} />;
|
|
}
|
|
|
|
return <GameApp onSwitchToSandbox={() => setMode('sandbox')} />;
|
|
}
|
|
|
|
createRoot(document.getElementById('root')).render(<Root />);
|