<commit_before>/**
 * Option defaults used by the Problem Widget.
 */
glift.widgets.options.problem = {
  /**
   * List of problem strings to cycle through.
   */
  sgfStringList: [],

  /**
   * Index into the above array.  It seems unlikely that anybody would want to
   * override this setting, but it's here or clarity.
   */
  problemIndex: 0,

  /**
   * The function that produces the problem controller.
   */
  controllerFunc: glift.controllers.staticProblem,

  /**
   * We want the problem widget to be smart about the relevant board region.
   */
  boardRegionType: glift.enums.boardRegions.AUTO,

  /**
   * Icons specified by the problem widget.
   */
  icons: ['play', 'refresh', 'roadmap', 'checkbox'],

  /**
   * Turn off the comment box, by default
   */
  // TODO(kashomon): Nevisit this idea later. Maybe problems just need a smaller
  // comment box?
  useCommentBar: false,

  /**
   * Don't show variations for problems, of course =).
   */
  showVariations: glift.enums.showVariations.NEVER,

  /**
   * Keymappings for the problem widget
   */
  // TODO(kashomon): Add key mappings for problems.
  keyMappings: {},

  /**
   * Problem-specific actions.
   */
  actions: {
    stones: {
      /**
       * Add a stone and report if it was correct.
       */
      mouseup: function(widget, pt) {
        var currentPlayer = widget.controller.getCurrentPlayer();
        var data = widget.controller.addStone(pt, currentPlayer);
        var problemResults = glift.enums.problemResults;
        if (data.result === problemResults.FAILURE) {
          return; // Illegal move -- nothing to do.
        }
        widget.applyPartialData(data);
        if (widget.correctness === undefined) {
          if (data.result === problemResults.CORRECT) {
            widget.iconBar.addTempIcon(
                'check', widget.iconBar.getIcon('checkbox').newBbox, '#0CC');
            widget.correctness = problemResults.CORRECT;
          } else if (data.result == problemResults.INCORRECT) {
            widget.iconBar.addTempIcon(
                'cross', widget.iconBar.getIcon('checkbox').newBbox, 'red');
            widget.correctness = problemResults.INCORRECT;
          }
        }<commit_msg>fix keymapping typo.<commit_after>/**
 * Option defaults used by the Problem Widget.
 */
glift.widgets.options.problem = {
  /**
   * List of problem strings to cycle through.
   */
  sgfStringList: [],

  /**
   * Index into the above array.  It seems unlikely that anybody would want to
   * override this setting, but it's here or clarity.
   */
  problemIndex: 0,

  /**
   * The function that produces the problem controller.
   */
  controllerFunc: glift.controllers.staticProblem,

  /**
   * We want the problem widget to be smart about the relevant board region.
   */
  boardRegionType: glift.enums.boardRegions.AUTO,

  /**
   * Icons specified by the problem widget.
   */
  icons: ['play', 'refresh', 'roadmap', 'checkbox'],

  /**
   * Turn off the comment box, by default
   */
  // TODO(kashomon): Nevisit this idea later. Maybe problems just need a smaller
  // comment box?
  useCommentBar: false,

  /**
   * Don't show variations for problems, of course =).
   */
  showVariations: glift.enums.showVariations.NEVER,

  /**
   * Keymappings for the problem widget
   */
  // TODO(kashomon): Add key mappings for problems.
  keyMapping: {},

  /**
   * Problem-specific actions.
   */
  actions: {
    stones: {
      /**
       * Add a stone and report if it was correct.
       */
      mouseup: function(widget, pt) {
        var currentPlayer = widget.controller.getCurrentPlayer();
        var data = widget.controller.addStone(pt, currentPlayer);
        var problemResults = glift.enums.problemResults;
        if (data.result === problemResults.FAILURE) {
          return; // Illegal move -- nothing to do.
        }
        widget.applyPartialData(data);
        if (widget.correctness === undefined) {
          if (data.result === problemResults.CORRECT) {
            widget.iconBar.addTempIcon(
                'check', widget.iconBar.getIcon('checkbox').newBbox, '#0CC');
            widget.correctness = problemResults.CORRECT;
          } else if (data.result == problemResults.INCORRECT) {
            widget.iconBar.addTempIcon(
                'cross', widget.iconBar.getIcon('checkbox').newBbox, 'red');
            widget.correctness = problemResults.INCORRECT;
          }
        }
{'fraction_non_alphanumeric': 0.11914414414414415, 'fraction_numerical': 0.0009009009009009009, 'mean_word_length': 2.421417565485362, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3285872', 'n_tokens_mistral': 1297, 'n_tokens_neox': 1254, 'n_words': 354}