(function(stopwatch){
    if (!stopwatch) { throw new Error('stopwatch namespace not found'); }
    console.log('Ready to play!');

    var game = new stopwatch.Game(5);
    new stopwatch.GameView(game, document.getElementById('stopwatch'));

    window.game = game;
})(stopwatch);

(function(stopwatch){
    if (!stopwatch) { throw new Error('stopwatch namespace not found'); }
    console.log('Ready to play!');

    var game = new stopwatch.Game(5);
    var view = new stopwatch.GameView(game, document.getElementById('stopwatch'));

    function loop(){
        view.update();
        requestAnimationFrame(loop);
    }
    loop();

    window.game = game;
})(stopwatch);

Update Game view on each animation frame
Update Game view on each animation frame
