def simulate(firearms_skill, recoil=0.0):
	recoil = float(recoil)
	bullet_direction = 0
	bullet_pos = [0, 0]
	bullet_velocity = [0, 0]
	_deviations = []
	_hits = 0
	
	for i in range(bullets):
		bullet_velocity = [0, 0]
		bullet_pos = [0, 0]
		bullet_deviation = (1-_weapon['accuracy'])+recoil
		deviation_mod = aim_difficulty*(1-((firearms_skill/10.0)*firearms_skill_mod))
		deviation = (bullet_deviation*aim_difficulty)*deviation_mod
		bullet_direction = random.uniform(-deviation, deviation)
		
		########################
		## ENABLE FOR RELEASE ##
		########################
		#recoil = clip(recoil+(_weapon['recoil']*stance_mod), 0.0, 1.0)
		
		_end_pos = bullet_trajectory(bullet_pos, bullet_direction)
		_direction_deviation = abs(bullet_direction)
		_target_hit_certainty = _direction_deviation/hit_certainty_mod
		_hits += _target_hit_certainty<=1
		_deviations.append(_direction_deviation)
	
	#print 'Deviations: mean=%0.4f, min=%0.4f, max=%0.4f' % (sum(_deviations)/len(_deviations), min(_deviations), max(_deviations))
	#print 'Accuracy:', _hits/float(bullets), '\n'
	
	#print 'Trajectory deviation: %0.4f' % _direction_deviation
	#print 'Non-certainty: %s (hit=%s)' % (_target_hit_certainty, _target_hit_certainty<=1)
	#print 'Limb accuracy: %0.4f' % (1-(_target_hit_certainty/1.0))*int(_target_hit_certainty<=1)
	#print
	#print 'dir', bullet_direction, 'dev', bullet_deviation, 'rec', recoil
	
	return _hits/float(bullets), _deviations
dataset/ETHPy150Open flags/Reactor-3/tests/M07_recoil.py/simulate/original