<commit_before>/// <reference path="../types/jquery.d.ts" />
/// <reference path="play.board.ts" />

module trains.play {

    export function InitialisePlay($container: JQuery): void {

        var playComponents = GetPlayComponent($container);
        var board = new trains.play.Board(playComponents.$trainCanvas, playComponents.$gridCanvas);

        playComponents.$hintText.css("right", trains.play.gridSize);
        playComponents.$toolsButton.css("left", trains.play.gridSize / 2);

        playComponents.$toolsButton.click(() => {
            showToolsContainer();
        });

        playComponents.$canvases.mousedown(() => {
            closeToolsContainer();
        });

        playComponents.tools.$toolsContainer.mousedown(() => {
            closeToolsContainer();
        });

        playComponents.tools.$tools.click(() => {
            closeToolsContainer();
        });

        playComponents.tools.$tools.mouseover((event) => {
            var $target = $(event.currentTarget);
            playComponents.tools.$title.text($target.data("title"));
        });

        playComponents.tools.$pencil.click(() => {
            board.setTool(trains.play.Tool.Track);
        });
<commit_msg>itty bitty smarter<commit_after>/// <reference path="../types/jquery.d.ts" />
/// <reference path="play.board.ts" />

module trains.play {

    export function InitialisePlay($container: JQuery): void {

        var playComponents = GetPlayComponent($container);
        var board = new trains.play.Board(playComponents.$trainCanvas, playComponents.$gridCanvas);

        playComponents.$hintText.css("right", trains.play.gridSize);
        playComponents.$toolsButton.css("left", trains.play.gridSize - (playComponents.$toolsButton.width() / 2));

        playComponents.$toolsButton.click(() => {
            showToolsContainer();
        });

        playComponents.$canvases.mousedown(() => {
            closeToolsContainer();
        });

        playComponents.tools.$toolsContainer.mousedown(() => {
            closeToolsContainer();
        });

        playComponents.tools.$tools.click(() => {
            closeToolsContainer();
        });

        playComponents.tools.$tools.mouseover((event) => {
            var $target = $(event.currentTarget);
            playComponents.tools.$title.text($target.data("title"));
        });

        playComponents.tools.$pencil.click(() => {
            board.setTool(trains.play.Tool.Track);
        });

{'fraction_non_alphanumeric': 0.15770319450060655, 'fraction_numerical': 0.0008087343307723412, 'mean_word_length': 2.5142045454545454, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 19, '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': '3164698', 'n_tokens_mistral': 653, 'n_tokens_neox': 627, 'n_words': 83}