<commit_before>define([
    "react",
    "underscore"
],
function (
    React,
    _
    ) {
    return React.createClass({
        render: function() {
            var tempStyle = {
                width: "100px",
                height: "100px"
            };

            return (
                <div className="mafia-container">
                    <img id="role-pic" style={{ width: tempStyle.width, height: tempStyle.height }} src={ this.props.currentPlayer.get('role').picture }></img>
                    <div id="role-name">{ this.props.currentPlayer.get('role').name }</div>
                </div>
            );
        }
    });
});

<commit_msg>some socket message handlers for mafia view<commit_after>define([
    "react",
    "underscore",
    "socket.io",
    "views/player_list"
],
function (
    React,
    _,
    io,
    PlayerListView
    ) {
    return React.createClass({
        componentDidMount: function() {
            this.socket = io();
            this.socket.on('night_action', this._renderNightAction);
            this.socket.on('kill_registered', this._renderNightWait);
        },

        getInitialState: function() {
            return {nightAction: false,
                    nightWait: false,
                    day: false};
        },

        _renderNightAction: function(data) {
            this.setState({nightAction: true,
                           nightWait: false});
        },

        _renderNightWait: function(data) {
            this.setState({nightAction: false,
                           nightWait: true});
        },

        render: function() {
            if(this.state.nightAction === true) {
                return (
                    <div>
                        <div> Its night time player...who do you want to kill? </div>
                        <PlayerListView players={ this.props.game.get('players') } />
                    </div>
                );
            } else if (this.state.nightWait === true) {
                return (
                        <div> Night time...Please wait! </div>
                );
            }
            var tempStyle = {
                width: "100px",
                height: "100px"
            };

            return (
                <div className="mafia-container">
                    <img id="role-pic" style={{ width: tempStyle.width, height: tempStyle.height }} src={ this.props.currentPlayer.get('role').picture }></img>
                    <div id="role-name">{ this.props.currentPlayer.get('role').name }</div>
                </div>
            );
        }
    });
});


{'fraction_non_alphanumeric': 0.13366718027734978, 'fraction_numerical': 0.004622496147919877, 'mean_word_length': 1.3481012658227849, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 0, '>': 22, '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': '7122758', 'n_tokens_mistral': 715, 'n_tokens_neox': 671, 'n_words': 134}