<commit_before>/**
 * Part of the evias/pacNEM package.
 *
 * NOTICE OF LICENSE
 *
 * Licensed under MIT License.
 *
 * This source file is subject to the MIT License that is
 * bundled with this package in the LICENSE file.
 *
 * @package    evias/pacNEM
 * @author     <NAME> <<EMAIL>> (https://github.com/evias)
 * @contributor <NAME> (https://github.com/dubzzz)
 * @license    MIT License
 * @copyright  (c) 2017, Gr<NAME> <<EMAIL>>
 * @link       https://github.com/evias/pacNEM
 */

(function() {

    var config = require("config"),
        path = require('path'),
        CryptoJS = require("crypto-js");

    var __Errors = function() {
        this.E_SERVER_ERROR = 2;
    };

    /**
     * class GameCredits provides a business layer for
     * Game Credits management. (High Scores reading / writing)
     *
     * @author  <NAME> <<EMAIL>> (https://github.com/evias)
     */
    var GameCredits = function(io, logger, chainDataLayer, dataLayer) {
        this.socketIO_ = io;
        this.logger_ = logger;
        this.blockchain_ = chainDataLayer;
        this.db_ = dataLayer;
        this.errors = new __Errors();

        var network_ = this.blockchain_.getNetwork();<commit_msg>fix scrcmp missing<commit_after>/**
 * Part of the evias/pacNEM package.
 *
 * NOTICE OF LICENSE
 *
 * Licensed under MIT License.
 *
 * This source file is subject to the MIT License that is
 * bundled with this package in the LICENSE file.
 *
 * @package    evias/pacNEM
 * @author     <NAME> <<EMAIL>> (https://github.com/evias)
 * @contributor <NAME> (https://github.com/dubzzz)
 * @license    MIT License
 * @copyright  (c) 2017, Gr<NAME> <<EMAIL>>
 * @link       https://github.com/evias/pacNEM
 */

(function() {

    var config = require("config"),
        path = require('path'),
        CryptoJS = require("crypto-js");

    var __Errors = function() {
        this.E_SERVER_ERROR = 2;
    };

    // score compare function for fast sorting
    var scrcmp = function(a, b) {
        if (a.score < b.score) return -1;
        if (a.score > b.score) return 1;

        return 0;
    };

    /**
     * class GameCredits provides a business layer for
     * Game Credits management. (High Scores reading / writing)
     *
     * @author  <NAME> <<EMAIL>> (https://github.com/evias)
     */
    var GameCredits = function(io, logger, chainDataLayer, dataLayer) {
        this.socketIO_ = io;
        this.logger_ = logger;
        this.blockchain_ = chainDataLayer;
        this.db_ = dataLayer;
        this.errors = new __Errors();

        var network_ = this.blockchain_.getNetwork();
{'fraction_non_alphanumeric': 0.13233024691358025, 'fraction_numerical': 0.005015432098765432, 'mean_word_length': 2.4946091644204853, 'pattern_counts': {'":': 0, '<': 24, '<?xml version=': 0, '>': 24, 'https://': 8, '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': '6622448', 'n_tokens_mistral': 840, 'n_tokens_neox': 802, 'n_words': 227}