src/core/WeaponSystem.js
/**
	* Inits the fuzzy module for the shotgun.
	*
	* @param {Object} fuzzySets - An object with predefined fuzzy sets.
	* @return {WeaponSystem} A reference to this weapon system.
	*/
Inits the fuzzy module for the shotgun.
@param {Object} fuzzySets - An object with predefined fuzzy sets.
@return {WeaponSystem} A reference to this weapon system.
Inits the fuzzy module for the shotgun . @param { Object } fuzzySets - An object with predefined fuzzy sets . @return { WeaponSystem } A reference to this weapon system .
_initShotgunFuzzyModule( fuzzySets ) {
		const fuzzyModuleShotGun = this.fuzzyModules.shotGun;
		const ammoStatusShotgun = new FuzzyVariable();
		const lowShot = new LeftShoulderFuzzySet( 0, 2, 4 );
		const okayShot = new TriangularFuzzySet( 2, 7, 10 );
		const LoadsShot = new RightShoulderFuzzySet( 7, 10, 12 );
		ammoStatusShotgun.add( lowShot );
		ammoStatusShotgun.add( okayShot );
		ammoStatusShotgun.add( LoadsShot );
		fuzzyModuleShotGun.addFLV( 'ammoStatus', ammoStatusShotgun );
		fuzzyModuleShotGun.addRule( new FuzzyRule( new FuzzyAND( fuzzySets.targetClose, lowShot ), fuzzySets.desirable ) );
		fuzzyModuleShotGun.addRule( new FuzzyRule( new FuzzyAND( fuzzySets.targetClose, okayShot ), fuzzySets.veryDesirable ) );
		fuzzyModuleShotGun.addRule( new FuzzyRule( new FuzzyAND( fuzzySets.targetClose, LoadsShot ), fuzzySets.veryDesirable ) );
		fuzzyModuleShotGun.addRule( new FuzzyRule( new FuzzyAND( fuzzySets.targetMedium, lowShot ), fuzzySets.undesirable ) );
		fuzzyModuleShotGun.addRule( new FuzzyRule( new FuzzyAND( fuzzySets.targetMedium, okayShot ), fuzzySets.undesirable ) );
		fuzzyModuleShotGun.addRule( new FuzzyRule( new FuzzyAND( fuzzySets.targetMedium, LoadsShot ), fuzzySets.desirable ) );
		fuzzyModuleShotGun.addRule( new FuzzyRule( new FuzzyAND( fuzzySets.targetFar, lowShot ), fuzzySets.undesirable ) );
		fuzzyModuleShotGun.addRule( new FuzzyRule( new FuzzyAND( fuzzySets.targetFar, okayShot ), fuzzySets.undesirable ) );
		fuzzyModuleShotGun.addRule( new FuzzyRule( new FuzzyAND( fuzzySets.targetFar, LoadsShot ), fuzzySets.undesirable ) );
		return this;
	}
_initShotgunFuzzyModule ( fuzzySets ) { const fuzzyModuleShotGun = this . fuzzyModules . shotGun ; const ammoStatusShotgun = new FuzzyVariable ( ) ; const lowShot = new LeftShoulderFuzzySet ( 0 , 2 , 4 ) ; const okayShot = new TriangularFuzzySet ( 2 , 7 , 10 ) ; const LoadsShot = new RightShoulderFuzzySet ( 7 , 10 , 12 ) ; ammoStatusShotgun . add ( lowShot ) ; ammoStatusShotgun . add ( okayShot ) ; ammoStatusShotgun . add ( LoadsShot ) ; fuzzyModuleShotGun . addFLV ( 'ammoStatus' , ammoStatusShotgun ) ; fuzzyModuleShotGun . addRule ( new FuzzyRule ( new FuzzyAND ( fuzzySets . targetClose , lowShot ) , fuzzySets . desirable ) ) ; fuzzyModuleShotGun . addRule ( new FuzzyRule ( new FuzzyAND ( fuzzySets . targetClose , okayShot ) , fuzzySets . veryDesirable ) ) ; fuzzyModuleShotGun . addRule ( new FuzzyRule ( new FuzzyAND ( fuzzySets . targetClose , LoadsShot ) , fuzzySets . veryDesirable ) ) ; fuzzyModuleShotGun . addRule ( new FuzzyRule ( new FuzzyAND ( fuzzySets . targetMedium , lowShot ) , fuzzySets . undesirable ) ) ; fuzzyModuleShotGun . addRule ( new FuzzyRule ( new FuzzyAND ( fuzzySets . targetMedium , okayShot ) , fuzzySets . undesirable ) ) ; fuzzyModuleShotGun . addRule ( new FuzzyRule ( new FuzzyAND ( fuzzySets . targetMedium , LoadsShot ) , fuzzySets . desirable ) ) ; fuzzyModuleShotGun . addRule ( new FuzzyRule ( new FuzzyAND ( fuzzySets . targetFar , lowShot ) , fuzzySets . undesirable ) ) ; fuzzyModuleShotGun . addRule ( new FuzzyRule ( new FuzzyAND ( fuzzySets . targetFar , okayShot ) , fuzzySets . undesirable ) ) ; fuzzyModuleShotGun . addRule ( new FuzzyRule ( new FuzzyAND ( fuzzySets . targetFar , LoadsShot ) , fuzzySets . undesirable ) ) ; return this ; }
Inits the fuzzy module for the shotgun.
Inits the fuzzy module for the shotgun .
// FLV ammo status // rules