<commit_before>module Scuffle {
	export class ConnectState extends Phaser.State {
		game : Game

		options = {
			'connect timeout': 2000,
			'reconnection limit': 1000,
			'max reconnection attempts': Infinity
		}

		create() {
			var group = this.add.group()
			group.alpha = 0

			var text = this.add.text(this.world.centerX, this.world.centerY,
				this.game.socket === undefined ? 'Connecting' : 'Reconnecting',
				undefined, group)
			text.anchor.setTo(0.5, 0.5)
			text.font = 'Iceland'
			text.fontSize = 60
			text.fill = '#acf'

			var tween = this.add.tween(group).to({ alpha: 1 }, 500, Phaser.Easing.Linear.None, true)
			tween.onComplete.add(() => {
				if(this.game.socket === undefined)
					this.game.socket = io.connect('//yellow.shockk.co.uk', this.options)
				else
					this.game.socket.removeAllListeners()

				this.game.socket.once('connect', () => {
					var tween = this.add.tween(group).to({ alpha: 0 }, 500, Phaser.Easing.Linear.None, true)
					tween.onComplete.add(() => this.game.state.start('Protocol'))
				})
				this.game.socket.once('disconnect', () => this.game.state.start('Connect'))

				if(this.game.latencyInterval !== undefined)
					clearInterval(this.game.latencyInterval)
				this.game.latencyInterval = setInterval(() => {
					var tStart = performance.now()
					this.game.socket.emit('ping')
					this.game.socket.once('pong', () => {
						this.game.latency /= 2
						this.game.latency = performance.now() - tStart
					})
				}, 500)
			})
		}
	}
}
<commit_msg>Reverted client change<commit_after>module Scuffle {
	export class ConnectState extends Phaser.State {
		game : Game

		options = {
			'connect timeout': 2000,
			'reconnection limit': 1000,
			'max reconnection attempts': Infinity
		}

		create() {
			var group = this.add.group()
			group.alpha = 0

			var text = this.add.text(this.world.centerX, this.world.centerY,
				this.game.socket === undefined ? 'Connecting' : 'Reconnecting',
				undefined, group)
			text.anchor.setTo(0.5, 0.5)
			text.font = 'Iceland'
			text.fontSize = 60
			text.fill = '#acf'

			var tween = this.add.tween(group).to({ alpha: 1 }, 500, Phaser.Easing.Linear.None, true)
			tween.onComplete.add(() => {
				if(this.game.socket === undefined)
					this.game.socket = io.connect('http://yellow.shockk.co.uk', this.options)
				else
					this.game.socket.removeAllListeners()

				this.game.socket.once('connect', () => {
					var tween = this.add.tween(group).to({ alpha: 0 }, 500, Phaser.Easing.Linear.None, true)
					tween.onComplete.add(() => this.game.state.start('Protocol'))
				})
				this.game.socket.once('disconnect', () => this.game.state.start('Connect'))

				if(this.game.latencyInterval !== undefined)
					clearInterval(this.game.latencyInterval)
				this.game.latencyInterval = setInterval(() => {
					var tStart = performance.now()
					this.game.socket.emit('ping')
					this.game.socket.once('pong', () => {
						this.game.latency /= 2
						this.game.latency = performance.now() - tStart
					})
				}, 500)
			})
		}
	}
}

{'fraction_non_alphanumeric': 0.1674342105263158, 'fraction_numerical': 0.017763157894736842, 'mean_word_length': 3.07095046854083, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '2195718', 'n_tokens_mistral': 1304, 'n_tokens_neox': 1023, 'n_words': 180}