<commit_before>module VirusGame {
    export class BoardGame extends Phaser.State {

        number_of_players: number = 2;
        current_player_number: number;
        left_turn_cells: number;

        board: Phaser.Group;
        players: Array<BoardPlayer>;
        info: Phaser.Text;

        colors: Array<string> = ['blue','yellow'];

        create() {
            this.addPlayers();
            this.initGame();
            this.drawBoard();
            this.drawInfo();
        }

        private drawInfo() {
            this.info = this.add.text(this.world.centerX,10,null,null);
            this.info.anchor.set(0.5,0);
            this.setInfo();
        }

        private setInfo() {
            var str = "Turn of " + this.current_player_color + " player";
            this.info.setText(str);
            this.info.setStyle({
                "fill":this.current_player_color,
                "font":"bold 40px Arial"
            });
        }

        private drawBoard() {
           this.board = this.add.group();

           for (let i=0; i<10; i++) {
                for (let j=0; j<10; j++) {
                    this.addCell(i,j);
                }
            }
            this.board.align(10,10,38,36);
            this.board.alignIn(this.world.bounds,Phaser.CENTER);
        }

        private addCell(x: number, y: number) {
            let cell = new BoardCell(this.game, x,y, this);
        }

        private addPlayers() {
            this.players = [];
            for (let i=0; i<this.number_of_players; i++) {
                this.players.push(new BoardPlayer(this.colors[i]));
            }
        }

        private initGame() {
            this.current_player_number = 0;
            this.left_turn_cells = 3;
        }

        get current_player_color():string {
            return this.players[this.current_player_number].color;
        }

        endTurn() {
            this.current_player_number = (this.current_player_number+1)%this.number_of_players;
            this.setInfo();
        }
    }
}<commit_msg>var -> let<commit_after>module VirusGame {
    export class BoardGame extends Phaser.State {

        number_of_players: number = 2;
        current_player_number: number;
        left_turn_cells: number;

        board: Phaser.Group;
        players: Array<BoardPlayer>;
        info: Phaser.Text;

        colors: Array<string> = ['blue','yellow'];

        create() {
            this.addPlayers();
            this.initGame();
            this.drawBoard();
            this.drawInfo();
        }

        private drawInfo() {
            this.info = this.add.text(this.world.centerX,10,null,null);
            this.info.anchor.set(0.5,0);
            this.setInfo();
        }

        private setInfo() {
            let str = "Turn of " + this.current_player_color + " player";
            this.info.setText(str);
            this.info.setStyle({
                "fill":this.current_player_color,
                "font":"bold 40px Arial"
            });
        }

        private drawBoard() {
           this.board = this.add.group();

           for (let i=0; i<10; i++) {
                for (let j=0; j<10; j++) {
                    this.addCell(i,j);
                }
            }
            this.board.align(10,10,38,36);
            this.board.alignIn(this.world.bounds,Phaser.CENTER);
        }

        private addCell(x: number, y: number) {
            let cell = new BoardCell(this.game, x,y, this);
        }

        private addPlayers() {
            this.players = [];
            for (let i=0; i<this.number_of_players; i++) {
                this.players.push(new BoardPlayer(this.colors[i]));
            }
        }

        private initGame() {
            this.current_player_number = 0;
            this.left_turn_cells = 3;
        }

        get current_player_color():string {
            return this.players[this.current_player_number].color;
        }

        endTurn() {
            this.current_player_number = (this.current_player_number+1)%this.number_of_players;
            this.setInfo();
        }
    }
}
{'fraction_non_alphanumeric': 0.12085586644721373, 'fraction_numerical': 0.012226663531624736, 'mean_word_length': 1.4033898305084747, 'pattern_counts': {'":': 4, '<': 13, '<?xml version=': 0, '>': 8, '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': '718853', 'n_tokens_mistral': 1303, 'n_tokens_neox': 1195, 'n_words': 201}