<commit_before>/**
 *  @module Screen
 *  @desc Directs a game screen
 *  @copyright (C) SpilGames
 *  @author <NAME>
 *  @license BSD 3-Clause License (see LICENSE file in project root)
 */
glue.module.create(
    'glue/screen',
    [
        'glue'
    ],
    function (Glue) {
        'use strict';
        var Sugar = Glue.sugar;

        return function (name) {
            var objects = [],
                module = {
                    addObject: function (object) {
                        if (Sugar.isObject(object)) {
                            objects.push(object);
                        }
                    },
                    getObjects: function () {
                        return objects;
                    },
                    getName: function () {
                        return name;
                    }
                };

            return module;
        };
    }
);<commit_msg>removeObject method added and jsdoc comments<commit_after>/**
 *  @module Screen
 *  @desc Directs a game screen
 *  @copyright (C) SpilGames
 *  @author <NAME>
 *  @license BSD 3-Clause License (see LICENSE file in project root)
 */
glue.module.create(
    'glue/screen',
    [
        'glue'
    ],
    function (Glue) {
        'use strict';
        var Sugar = Glue.sugar;

        return function (name) {
            var objects = [],
                module = {
                    /**
                     * Add object to screen
                     * @name addObject
                     * @memberOf screen
                     * @function
                     */
                    addObject: function (object) {
                        if (Sugar.isObject(object)) {
                            objects.push(object);
                        }
                    },
                    /**
                     * Removes object from screen
                     * @name removeObject
                     * @memberOf screen
                     * @function
                     */
                    removeObject: function (object) {
                        var index;
                        if (Sugar.isObject(object)) {
                            index = objects.indexOf(object);
                            if (index >= 0) {
                                objects.splice(index, 1);
                            }
                        }
                    },
                    /**
                     * Gets the object array
                     * @name getObjects
                     * @memberOf screen
                     * @function
                     * @return Array of added objects
                     */
                    getObjects: function () {
                        return objects;
                    },
                    /**
                     * Get the name of the screen
                     * @name getName
                     * @memberOf screen
                     * @function
                     * @return Screen name as string
                     */
                    getName: function () {
                        return name;
                    }
                };

            return module;
        };
    }
);
{'fraction_non_alphanumeric': 0.08395989974937343, 'fraction_numerical': 0.0012531328320802004, 'mean_word_length': 0.761169332597904, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, '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': '4521143', 'n_tokens_mistral': 738, 'n_tokens_neox': 673, 'n_words': 177}