<commit_before>require(
    ['js/BoardController.js', 'js/BoardRenderer.js', 'js/GameStatus.js', 'js/MessageUtil.js'],
    function (controller, renderer, gameStatus, message) {
        'use strict';

        var runningId = 0;
        var tickCount = 0;

        console.log('Game of life: Krazov implementation');

        // prepare table
        controller
            .setSize(15, 15)
            .createBoard();

        // display table
        renderer
            .setContainer(document.getElementById('board'))
            .drawBoard()
            .attachActions();

        // start button
        document.getElementById('start').addEventListener('click', function startGameFn() {
            var tick = function () {
                message.display('Tick #' + (++tickCount));

                controller.updateTable();
                renderer.refreshTable();

                if (controller.isLifeStil()) {
                    message.display(`After ${tickCount} life has become still. Game over.`);

                    gameStatus.setStatus(gameStatus.STOPPED);

                    runningId = 0;
                    tickCount = 0;
                }

                if (gameStatus.isRunning()) {
                    runningId = setTimeout(tick, 1000);
                }
            };

            gameStatus.setStatus(gameStatus.RUNNING);
            runningId = setTimeout(tick, 1000);

            message.display('Game started.');<commit_msg>Updating message on achievieng stability.<commit_after>require(
    ['js/BoardController.js', 'js/BoardRenderer.js', 'js/GameStatus.js', 'js/MessageUtil.js'],
    function (controller, renderer, gameStatus, message) {
        'use strict';

        var runningId = 0;
        var tickCount = 0;

        console.log('Game of life: Krazov implementation');

        // prepare table
        controller
            .setSize(17, 17)
            .createBoard();

        // display table
        renderer
            .setContainer(document.getElementById('board'))
            .drawBoard()
            .attachActions();

        // start button
        document.getElementById('start').addEventListener('click', function startGameFn() {
            var tick = function () {
                message.display('Tick #' + (++tickCount));

                controller.updateTable();
                renderer.refreshTable();

                if (controller.isLifeStil()) {
                    message.display(`After ${tickCount} ticks life has become still. Game over.`);

                    gameStatus.setStatus(gameStatus.STOPPED);

                    runningId = 0;
                    tickCount = 0;
                }

                if (gameStatus.isRunning()) {
                    runningId = setTimeout(tick, 1000);
                }
            };

            gameStatus.setStatus(gameStatus.RUNNING);
            runningId = setTimeout(tick, 1000);

            message.display('Game started.');
{'fraction_non_alphanumeric': 0.1152027027027027, 'fraction_numerical': 0.010810810810810811, 'mean_word_length': 1.6180371352785146, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5121557', 'n_tokens_mistral': 768, 'n_tokens_neox': 696, 'n_words': 150}