<commit_before>/**
 * Tick will be the game's life changer (literally).
 */
var Tick = new Class({
	initialize: function(ticks)
	{
		var DEFAULT_TICKS_PER_SECOND = 100; // FOR LATER
		var TIME_SECOND = 1000;             // 1 Second.

		this.type         = 'Ticker';
		this.ticks        = TIME_SECOND / DEFAULT_TICKS_PER_SECOND;
		this.paused       = false;
		this.delegate     = null;

		this.refreshRate = function()
		{
			return this.ticks;
		}
		this.iteration = function()
		{
			return TIME_SECOND;
		}
		this.status = function()
		{
			var status = {
				'time': Date.now(),
				'ticks': this.ticks,
				'paused': this.paused,
			};

			return status;
		}
		this.callBack = function(delegate)
		{
			this.delegate = delegate;
		}

		ticks = Math.floor(ticks);
		if (!ticks || ticks < 0)
		{
			console.warn('Ticks must be in the range of 1-64.\n  Set to default: ' + DEFAULT_TICKS_PER_SECOND);
			this.ticks = TIME_SECOND / EFAULT_TICKS_PER_SECOND;
		}
		else
		{
			this.ticks = TIME_SECOND / ticks;
		}

		var self = this;
		this.refresh = function()
		{
			self.status();

			if (self.delegate)
			{
				self.delegate(self.status());
			}
		}
	},
	start: function()
	{
		if (!this.interval)
		{
			this.__start();
		}
	},
	stop: function()
	{
		clearInterval(this.interval);
		this.interval = null;
	},
	watch: function(delegate)
	{
		if (typeof delegate == undefined)
		{
			this.__noDelegateError();
		}
		if (typeof delegate !== 'function')
		{
			this.__wrongDelegateError();
		}

		this.callBack(delegate);
	},
	__start: function()
	{
		console.log(this.refreshRate());
		this.interval = this.refresh.periodical(this.refreshRate());
	},
	__getCurrentTime: function()
	{
		return Date.now()
	},
	__noDelegateError: function()
	{
		throw 'Error: Callback was not defined.'
	},
	__wrongDelegateError: function()
	{
		throw 'Error: Callback must be a function.'
	},
});<commit_msg>Removed console<commit_after>/**
 * Tick will be the game's life changer (literally).
 */
var Tick = new Class({
	initialize: function(ticks)
	{
		var DEFAULT_TICKS_PER_SECOND = 100; // FOR LATER
		var TIME_SECOND = 1000;             // 1 Second.

		this.type         = 'Ticker';
		this.ticks        = TIME_SECOND / DEFAULT_TICKS_PER_SECOND;
		this.paused       = false;
		this.delegate     = null;

		this.refreshRate = function()
		{
			return this.ticks;
		}
		this.iteration = function()
		{
			return TIME_SECOND;
		}
		this.status = function()
		{
			var status = {
				'time': Date.now(),
				'ticks': this.ticks,
				'paused': this.paused,
			};

			return status;
		}
		this.callBack = function(delegate)
		{
			this.delegate = delegate;
		}

		ticks = Math.floor(ticks);
		if (!ticks || ticks < 0)
		{
			console.warn('Ticks must be in the range of 1-64.\n  Set to default: ' + DEFAULT_TICKS_PER_SECOND);
			this.ticks = TIME_SECOND / EFAULT_TICKS_PER_SECOND;
		}
		else
		{
			this.ticks = TIME_SECOND / ticks;
		}

		var self = this;
		this.refresh = function()
		{
			self.status();

			if (self.delegate)
			{
				self.delegate(self.status());
			}
		}
	},
	start: function()
	{
		if (!this.interval)
		{
			this.__start();
		}
	},
	stop: function()
	{
		clearInterval(this.interval);
		this.interval = null;
	},
	watch: function(delegate)
	{
		if (typeof delegate == undefined)
		{
			this.__noDelegateError();
		}
		if (typeof delegate !== 'function')
		{
			this.__wrongDelegateError();
		}

		this.callBack(delegate);
	},
	__start: function()
	{
		this.interval = this.refresh.periodical(this.refreshRate());
	},
	__getCurrentTime: function()
	{
		return Date.now()
	},
	__noDelegateError: function()
	{
		throw 'Error: Callback was not defined.'
	},
	__wrongDelegateError: function()
	{
		throw 'Error: Callback must be a function.'
	},
});
{'fraction_non_alphanumeric': 0.1436950146627566, 'fraction_numerical': 0.006398293788323114, 'mean_word_length': 2.816887080366226, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1731780', 'n_tokens_mistral': 1593, 'n_tokens_neox': 1377, 'n_words': 282}