<commit_before>﻿/// <reference path="Scripts/collections.ts" />

class AliveClass implements IAliveAgent, IStateSwitchable {
    private states: collections.Dictionary<string, PirateState>;
    private handler: IManagersHandler;

    private currentState: string;
    private lastTick: number;

    public constructor() {
        this.lastTick = 0;
    }

    /**
     * This method gets called once when the character is being activated by the system.
     * @param handler An object that allows the code to get reference to the managers.
     * @param disabledPermissions A list of permissions that the user disabled.
     */
    onStart(handler: IManagersHandler, disabledPermissions: string[]): void {
        this.handler = handler;
        this.handler.getActionManager().move(0, this.handler.getConfigurationManager().getScreenHeight(), 0);
        this.handler.getActionManager().draw("activate.png", this.handler.getConfigurationManager().getMaximalResizeRatio(), false);
        this.initializeStates(handler);
    }

    /**
     * This method gets called every 250 milliseconds by the system, any logic updates to the state of your character should occur here.
     * Note: onTick only gets called when the screen is ON.
     * @param time The current time (in milliseconds) on the device.
     */
    onTick(time: number): void {
        this.states.getValue(this.currentState).onTick(time);
    }

    /**
     * This method gets called by the system every 1 hour (may be in a different rate depending on the device).
     * Note: this method only gets called when the screen is OFF.
     * @param time The current time (in milliseconds) on the device.
     */
    onBackgroundTick(time: number) {
        this.states.getValue(this.currentState).onBackgroundTick(time);
    }<commit_msg>Update app.ts<commit_after>﻿/// <reference path="Scripts/collections.ts" />

class AliveClass implements IAliveAgent, IStateSwitchable {
    private states: collections.Dictionary<string, PirateState>;
    private handler: IManagersHandler;

    private currentState: string;
    private lastTick: number;

    public constructor() {
        this.lastTick = 0;
    }

    /**
     * This method gets called once when the character is being activated by the system.
     * You can only get the references to the managers, but you can NOT use them untill onTick is called.
     * @param handler An object that allows the code to get reference to the managers.
     * @param disabledPermissions A list of permissions that the user disabled.
     */
    onStart(handler: IManagersHandler, disabledPermissions: string[]): void {
        this.handler = handler;
        this.handler.getActionManager().move(0, this.handler.getConfigurationManager().getScreenHeight(), 0);
        this.handler.getActionManager().draw("activate.png", this.handler.getConfigurationManager().getMaximalResizeRatio(), false);
        this.initializeStates(handler);
    }

    /**
     * This method gets called every 250 milliseconds by the system, any logic updates to the state of your character should occur here.
     * Note: onTick only gets called when the screen is ON.
     * @param time The current time (in milliseconds) on the device.
     */
    onTick(time: number): void {
        this.states.getValue(this.currentState).onTick(time);
    }

    /**
     * This method gets called by the system every 1 hour (may be in a different rate depending on the device).
     * Note: this method only gets called when the screen is OFF.
     * @param time The current time (in milliseconds) on the device.
     */
    onBackgroundTick(time: number) {
        this.states.getValue(this.currentState).onBackgroundTick(time);
    }
{'fraction_non_alphanumeric': 0.09007551240560949, 'fraction_numerical': 0.0037756202804746495, 'mean_word_length': 3.2583237657864523, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '78028', 'n_tokens_mistral': 964, 'n_tokens_neox': 940, 'n_words': 354}