<commit_before>import { ApiGateway, Routes } from './net/api';
import { Tutorial } from './game/tutorial/intro';
declare var $: any;
import * as React from 'react';
import Machine from './game/compiler/machine';
import Panel from './controls/panel';
import Board from './game/board';
import Act from './game/run';
import Notification from './game/notification';
import { LevelForwarder, LevelRouter } from './game/levels';
import { ImageLoader } from './imagePreloader';
import { connect } from 'react-redux';
import { Dispatch } from 'redux';
import { performAction, startRobot, stopRobot, updateRobot, killRobot, win, setMap, storeAction, removeStatement } from './actions';
import { Action, GameState, Goal, IState, Map, Robot, Way, Event as EventBody } from './models';

interface AppProps {
    gameState: GameState;
    robot: Robot;
    goal: Goal;
    map: Map;
    events: Event[];
    actions: Action[];
    dispatch: Dispatch<any>;
}

interface GameBoardState {
    actions?: Action[],
    robot?: Robot,
    goal?: Goal,
    map?: Map,
    gameState?: GameState,
    events?: EventBody[]
    boardCols: number;
    controlCols: number;
    editingMode : Way;
}

class Game extends React.Component<any, GameBoardState> {
    boardColumn: HTMLDivElement;
    controlsColumn: HTMLDivElement;

    public constructor() {
        super();
        this.state = {
            boardCols: 8,
            controlCols: 4,
            editingMode: Way.Click
        }
    }

    private setHeight() {
        let screenHeight = $(window).height() - $('nav').height();
        if ($(this.boardColumn).height() > screenHeight && this.state.boardCols > 6) {
            this.setState((Object.assign(this.state, { boardCols : this.state.boardCols-1, controlCols: this.state.controlCols+1 }) as any));
            setTimeout(() => this.setHeight(), 50);
        }
        else if ($(this.boardColumn).height() <= (screenHeight /2) && this.state.controlCols > 2) {
            this.setState((Object.assign(this.state, { boardCols : this.state.boardCols+1, controlCols: this.state.controlCols-1 }) as any));
            setTimeout(() => this.setHeight(), 50);<commit_msg>Adjusted screen height autocorrection to a level that fits more screens better<commit_after>import { ApiGateway, Routes } from './net/api';
import { Tutorial } from './game/tutorial/intro';
declare var $: any;
import * as React from 'react';
import Machine from './game/compiler/machine';
import Panel from './controls/panel';
import Board from './game/board';
import Act from './game/run';
import Notification from './game/notification';
import { LevelForwarder, LevelRouter } from './game/levels';
import { ImageLoader } from './imagePreloader';
import { connect } from 'react-redux';
import { Dispatch } from 'redux';
import { performAction, startRobot, stopRobot, updateRobot, killRobot, win, setMap, storeAction, removeStatement } from './actions';
import { Action, GameState, Goal, IState, Map, Robot, Way, Event as EventBody } from './models';

interface AppProps {
    gameState: GameState;
    robot: Robot;
    goal: Goal;
    map: Map;
    events: Event[];
    actions: Action[];
    dispatch: Dispatch<any>;
}

interface GameBoardState {
    actions?: Action[],
    robot?: Robot,
    goal?: Goal,
    map?: Map,
    gameState?: GameState,
    events?: EventBody[]
    boardCols: number;
    controlCols: number;
    editingMode : Way;
}

class Game extends React.Component<any, GameBoardState> {
    boardColumn: HTMLDivElement;
    controlsColumn: HTMLDivElement;

    public constructor() {
        super();
        this.state = {
            boardCols: 8,
            controlCols: 4,
            editingMode: Way.Click
        }
    }

    private setHeight() {
        let screenHeight = $(window).height() - $('nav').height();
        if ($(this.boardColumn).height() > screenHeight && this.state.boardCols > 5) {
            this.setState((Object.assign(this.state, { boardCols : this.state.boardCols-1, controlCols: this.state.controlCols+1 }) as any));
            setTimeout(() => this.setHeight(), 50);
        }
        else if ($(this.boardColumn).height() <= (screenHeight /2) && this.state.controlCols > 2) {
            this.setState((Object.assign(this.state, { boardCols : this.state.boardCols+1, controlCols: this.state.controlCols-1 }) as any));
            setTimeout(() => this.setHeight(), 50);
{'fraction_non_alphanumeric': 0.14340997040746642, 'fraction_numerical': 0.005918506715228773, 'mean_word_length': 3.216890595009597, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 17, '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': '5379720', 'n_tokens_mistral': 1310, 'n_tokens_neox': 1300, 'n_words': 354}