<commit_before>import * as PIXI from "pixi.js";
import * as R from "ramda";
import * as React from "react";

import {Action} from "Common/Actions";
import {Game} from "Common/Game";
import {City, Faction, TerrainSegment, Unit} from "Common/Models";
import * as RPC from "Common/RPC";
import {Types} from "Common/Types";
import {getHSL, Hex} from "Common/Util";

import {Camera, ICameraEvent} from "../../Camera";
import {Client} from "../../Client";
import {ClientGame} from "../../ClientGame";
import {IGameTime} from "../../GameTime";

import {Controls} from "../Common/Controls";
import {EditableField} from "../Common/EditableField";
import {FactionCube} from "../Common/FactionCube";

import {EndTurnHud} from "./EndTurnHud";
import {FactionHud} from "./FactionHud";
import {SelectHud} from "./SelectHud";

const style = require("./GameInProgress.scss");

export interface IGameInProgressProps {
    client: Client;
    types: Types;
    game: ClientGame;
    switchToGameList: () => void;
}

export interface IGameInProgressState {
    selectedUnit: Unit;
    selectedCity: City;
    inAction: Action<any>;
}

export class GameInProgress extends React.Component<IGameInProgressProps, IGameInProgressState> {
    private canvasElement: HTMLCanvasElement;
    private ctx: CanvasRenderingContext2D;
    private app: PIXI.Application;
    private animationHandle: number;
    private camera: Camera;
    private hover: Hex;
    private hoverContainer: PIXI.Container;
    private textures: {[key: string]: PIXI.Texture};

    constructor(props: IGameInProgressProps) {
        super(props);

        this.camera = new Camera();
        this.textures = {};

        this.bindCanvasElement = this.bindCanvasElement.bind(this);
        this.endTurn = this.endTurn.bind(this);
        this.cancelAction = this.cancelAction.bind(this);
    }

    public componentWillMount() {
        this.setState({selectedUnit: null, inAction: null, selectedCity: null});
    }

    public componentWillUnmount() {
        window.cancelAnimationFrame(this.animationHandle);
    }

    public render() {<commit_msg>client: remove unused variables<commit_after>import * as PIXI from "pixi.js";
import * as R from "ramda";
import * as React from "react";

import {Action} from "Common/Actions";
import {Game} from "Common/Game";
import {City, Faction, TerrainSegment, Unit} from "Common/Models";
import * as RPC from "Common/RPC";
import {Types} from "Common/Types";
import {getHSL, Hex} from "Common/Util";

import {Camera, ICameraEvent} from "../../Camera";
import {Client} from "../../Client";
import {ClientGame} from "../../ClientGame";
import {IGameTime} from "../../GameTime";

import {Controls} from "../Common/Controls";
import {EditableField} from "../Common/EditableField";
import {FactionCube} from "../Common/FactionCube";

import {EndTurnHud} from "./EndTurnHud";
import {FactionHud} from "./FactionHud";
import {SelectHud} from "./SelectHud";

const style = require("./GameInProgress.scss");

export interface IGameInProgressProps {
    client: Client;
    types: Types;
    game: ClientGame;
    switchToGameList: () => void;
}

export interface IGameInProgressState {
    selectedUnit: Unit;
    selectedCity: City;
    inAction: Action<any>;
}

export class GameInProgress extends React.Component<IGameInProgressProps, IGameInProgressState> {
    private canvasElement: HTMLCanvasElement;
    private app: PIXI.Application;
    private camera: Camera;
    private hover: Hex;
    private hoverContainer: PIXI.Container;

    constructor(props: IGameInProgressProps) {
        super(props);

        this.camera = new Camera();

        this.bindCanvasElement = this.bindCanvasElement.bind(this);
        this.endTurn = this.endTurn.bind(this);
        this.cancelAction = this.cancelAction.bind(this);
    }

    public componentWillMount() {
        this.setState({selectedUnit: null, inAction: null, selectedCity: null});
    }

    public componentWillUnmount() {
        this.app.destroy(false);
    }

    public render() {
{'fraction_non_alphanumeric': 0.1333498882542836, 'fraction_numerical': 0.00024832381425378696, 'mean_word_length': 3.9121951219512194, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '3824190', 'n_tokens_mistral': 1190, 'n_tokens_neox': 1185, 'n_words': 323}