<commit_before>/// <reference path="../../libssrc/socket.io-client.d.ts"/>
import {Logger} from "../utils/Logger";
import {Config} from "../config";

var log = Logger("CommunicationManager");

class CommunicationManager {

    protected socket : SocketIOClient.Socket;

    constructor() {
        this.socket = io.connect(Config.WS_DOMAIN);
        this.socket.on('connect', function (data) {
            log.info("Connected to Socket");
        });

        // TODO: this needs to be wired to a button or something
        var randNames = ["Peter", "Günter", "Inge", "Petra", "Annelise", "Gerd"];
        this.socket.emit("join", {
            name: randNames[Math.floor(Math.random() * randNames.length)]
        });

        this.listen();
    }

    listen() {

        this.socket.on("player data", function (data) {
            
        });

        this.socket.on("map data", function (data) {
            log.info(data.map);
        })

    }

}

export default CommunicationManager;<commit_msg>* bla<commit_after>/// <reference path="../../libssrc/socket.io-client.d.ts"/>
import {Logger} from "../utils/Logger";
import {Config} from "../config";

var log = Logger("CommunicationManager");

class CommunicationManager {

    protected socket : SocketIOClient.Socket;

    constructor() {
        this.socket = io.connect(Config.WS_DOMAIN);
        this.socket.on('connect', function (data) {
            log.info("Connected to Socket");
        });

        // TODO: this needs to be wired to a button or something
        var randNames = ["Peter", "Günter", "Inge", "Petra", "Annelise", "Gerd"];
        this.socket.emit("join", {
            name: randNames[Math.floor(Math.random() * randNames.length)]
        });

        this.listen();
    }

    listen() {

        this.socket.on("player data", function (data) {

        });

        this.socket.on("other player data", function (data) {

        });

        this.socket.on("map data", function (data) {
            log.info(data.map);
        })

    }

}

export default CommunicationManager;
{'fraction_non_alphanumeric': 0.16327519379844962, 'fraction_numerical': 0.0, 'mean_word_length': 2.304, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1765234', 'n_tokens_mistral': 622, 'n_tokens_neox': 591, 'n_words': 135}