Ecco un esempio di come potresti creare un semplice gioco utilizzando JavaScript all'interno di un singolo file HTML:
Questo codice crea un semplice gioco in cui controlli un cerchio blu con il mouse all'interno di un canvas. Puoi muovere il cerchio facendo muovere il mouse. Buon divertimento!