const renderCryps = require('./scenes/cryps');

const createSocket = require('./socket');
const registerEvents = require('./events');
const createTutorial = require('./tutorial');

document.fonts.load('10pt "Jura"').then(() => {
    const game = renderCryps();
    const tutorial = createTutorial();
    const events = registerEvents(game.registry, game.events, tutorial);
    const ws = createSocket(events);

    events.setWs(ws);
    events.setGameList([]);

    ws.connect();
});
