<commit_before>if (typeof (require) != 'undefined') {
	var loader = require('../../node_modules/Butterfly-js/dist/butterfly.min.js').loader;
}

/**
 * Module to deal with the game controls on the keyboard
 */
loader.addModule('Controls',
'B',
function (B) {
	"use strict";

	function keyDownEvent (e) {
		B.Events.fire('keydown', [e.keyCode]);
		if (~([controls.KEY_DOWN_ARROW, controls.KEY_LEFT_ARROW, controls.KEY_RIGHT_ARROW, controls.KEY_UP_ARROW].indexOf(e.keyCode))) {
			e.preventDefault();
		}
	}

	function keyUpEvent (e) {
		B.Events.fire('keyup', [e.keyCode]);
		if (~([controls.KEY_DOWN_ARROW, controls.KEY_LEFT_ARROW, controls.KEY_RIGHT_ARROW, controls.KEY_UP_ARROW].indexOf(e.keyCode))) {
			e.preventDefault();
		}
	}

	function _mouseCoordinates (e) {
		var rect = this.getBoundingClientRect(),
			root = document.documentElement;

		return [
			e.clientX - rect.left - root.scrollLeft,
			e.clientY - rect.top - root.scrollTop
		];
	}

	function mouseMovedEvent (e) {
		B.Events.fire('mouse-moved', _mouseCoordinates.apply(this, [e]));
	}

	function mouseClickedEvent (e) {
		B.Events.fire('mouse-clicked', _mouseCoordinates.apply(this, [e]));
	}<commit_msg>CORE - apply removed by passing the scope in arguments instead<commit_after>if (typeof (require) != 'undefined') {
	var loader = require('../../node_modules/Butterfly-js/dist/butterfly.min.js').loader;
}

/**
 * Module to deal with the game controls on the keyboard
 */
loader.addModule('Controls',
'B',
function (B) {
	"use strict";

	function keyDownEvent (e) {
		B.Events.fire('keydown', [e.keyCode]);
		if (~([controls.KEY_DOWN_ARROW, controls.KEY_LEFT_ARROW, controls.KEY_RIGHT_ARROW, controls.KEY_UP_ARROW].indexOf(e.keyCode))) {
			e.preventDefault();
		}
	}

	function keyUpEvent (e) {
		B.Events.fire('keyup', [e.keyCode]);
		if (~([controls.KEY_DOWN_ARROW, controls.KEY_LEFT_ARROW, controls.KEY_RIGHT_ARROW, controls.KEY_UP_ARROW].indexOf(e.keyCode))) {
			e.preventDefault();
		}
	}

	function _mouseCoordinates (element, event) {
		var rect = element.getBoundingClientRect(),
			root = document.documentElement;

		return [
			event.clientX - rect.left - root.scrollLeft,
			event.clientY - rect.top - root.scrollTop
		];
	}

	function mouseMovedEvent (e) {
		B.Events.fire('mouse-moved', _mouseCoordinates(this, e));
	}

	function mouseClickedEvent (e) {
		B.Events.fire('mouse-clicked', _mouseCoordinates(this, e));
	}
{'fraction_non_alphanumeric': 0.15953469048608226, 'fraction_numerical': 0.0, 'mean_word_length': 4.4603174603174605, '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': '2205635', 'n_tokens_mistral': 905, 'n_tokens_neox': 853, 'n_words': 154}