<commit_before>(function(Cortana) {
	'use strict';

	Cortana.KEY = {
		38: 'up',
		40: 'down',
		37: 'left',
		39: 'right',
		32: 'space'
	};

	var Input = function(game) {
		this.pressed = {
			up: false,
			down: false,
			left: false,
			right: false,
			space: false
		};

		this.init();
	}

	Input.prototype = {

		init: function() {
			addEventListener('keydown', this.handler.bind(this));
			addEventListener('keyup', this.handler.bind(this));
		},

		handler: function(event) {
			if (Cortana.KEY.hasOwnProperty(event.keyCode)) {
				var down = event.type == 'keydown';
				this.pressed[Cortana.KEY[event.keyCode]] = down;
				event.preventDefault();
			}
		}
	}

	Input.prototype.constructor = Input;
	Cortana.Input = Input;
}(Cortana));<commit_msg>make keys local in Input<commit_after>(function(Cortana) {
	'use strict';

	var keys = {
		38: 'up',
		40: 'down',
		37: 'left',
		39: 'right',
		32: 'space'
	};

	var Input = function(game) {

		this.pressed = {
			up: false,
			down: false,
			left: false,
			right: false,
			space: false
		};

		this.init();
	}

	Input.prototype = {

		init: function() {
			addEventListener('keydown', this.handler.bind(this));
			addEventListener('keyup', this.handler.bind(this));
		},

		handler: function(event) {
			if (keys.hasOwnProperty(event.keyCode)) {
				var down = event.type == 'keydown';
				this.pressed[keys[event.keyCode]] = down;
				event.preventDefault();
			}
		}
	}

	Input.prototype.constructor = Input;
	Cortana.Input = Input;
}(Cortana));
{'fraction_non_alphanumeric': 0.17405691594970218, 'fraction_numerical': 0.013236267372600927, 'mean_word_length': 3.32, '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': '166770', 'n_tokens_mistral': 647, 'n_tokens_neox': 547, 'n_words': 108}