<commit_before>(function () {

	'use strict';

	var GAME_WIDTH = mapConstants.NUM_COLUMNS * mapConstants.TILE_SIZE;
	var GAME_HEIGHT = mapConstants.NUM_ROWS * mapConstants.TILE_SIZE;

	var _game 	= null;
	var _map  	= null;
	var _player = null;
	var _isUpPressed = false;
	var _isRightPressed = false;

	// Auto Initialization
	init();

	// Init
	function init() {
		initPhaser();
	}

	function initPhaser() {
		// Add game
		_game =  new Phaser.Game(
			GAME_WIDTH, GAME_HEIGHT,
			Phaser.CANVAS, 'phaser-js-test',
			{
				preload: preload,
				create: create,
				update: update, 
				render: render
			}
		);

		// Create map
		_map = new Map(_game);

		// Create player 
		_player = new Player(_game, _map);
		_tonberry = new NPC(_game, _map);
	}

	function preload() {
		_map.preload();
		_player.preload();
		_tonberry.preload();
	}
	
})();<commit_msg>Implemented create and update method<commit_after>(function () {

	'use strict';

	var GAME_WIDTH = mapConstants.NUM_COLUMNS * mapConstants.TILE_SIZE;
	var GAME_HEIGHT = mapConstants.NUM_ROWS * mapConstants.TILE_SIZE;

	var _game 	= null;
	var _map  	= null;
	var _player = null;
	var _isUpPressed = false;
	var _isRightPressed = false;
	var _isDownPressed  = false;
	var _isLeftPressed  = false;
	_keyboardInput      = null;

	// Auto Initialization
	init();

	// Init
	function init() {
		initPhaser();
	}

	function initPhaser() {
		// Add game
		_game =  new Phaser.Game(
			GAME_WIDTH, GAME_HEIGHT,
			Phaser.CANVAS, 'phaser-js-test',
			{
				preload: preload,
				create: create,
				update: update, 
				render: render
			}
		);

		// Create map
		_map = new Map(_game);

		// Create player 
		_player = new Player(_game, _map);
		_tonberry = new NPC(_game, _map);
	}

	function preload() {
		_map.preload();
		_player.preload();
		_tonberry.preload();
	}

	function create() {
		// Set references
		_keyboardInput = _game.input.keyboard;

		// Init game objects
		_map.init();
		_player.init({x: 1, y: 1});
		_tonberry.init({x: 7, y: 1});
	}

	function update() {
		_player.update(
			_keyboardInput.isDown(Phaser.Keyboard.UP) || _isUpPressed, 
			_keyboardInput.isDown(Phaser.Keyboard.RIGHT) || _isRightPressed,
			_keyboardInput.isDown(Phaser.Keyboard.DOWN) || _isDownPressed,
			_keyboardInput.isDown(Phaser.Keyboard.LEFT) || _isLeftPressed
		);
		_tonberry.update();
	}
	
})();
{'fraction_non_alphanumeric': 0.1306939123031077, 'fraction_numerical': 0.0017028522775649213, 'mean_word_length': 3.311926605504587, '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': '4960605', 'n_tokens_mistral': 998, 'n_tokens_neox': 889, 'n_words': 186}