From ee03aad0d1a1c09e3887b380d1d6549faf55963a Mon Sep 17 00:00:00 2001 From: zepumph Date: Thu, 19 Sep 2019 13:54:26 -0800 Subject: [PATCH] var -> const in require statements, use arrow function in define require call, https://github.com/phetsims/tasks/issues/1010 --- js/basics/EEBasicsScreen.js | 22 +++--- js/basics/view/EEBasicsIconNode.js | 22 +++--- js/common/EEQueryParameters.js | 4 +- js/common/EESharedConstants.js | 10 +-- js/common/enum/AllowedRepresentations.js | 4 +- js/common/enum/CoinTermCreatorSetID.js | 4 +- js/common/enum/CoinTermTypeID.js | 4 +- js/common/enum/ViewMode.js | 4 +- js/common/model/AnimationSpec.js | 6 +- js/common/model/CoinTerm.js | 22 +++--- js/common/model/CoinTermFactory.js | 14 ++-- js/common/model/Expression.js | 26 +++---- js/common/model/ExpressionHint.js | 6 +- .../model/ExpressionManipulationModel.js | 28 ++++---- js/common/view/AbstractCoinTermNode.js | 26 +++---- js/common/view/BreakApartButton.js | 12 ++-- js/common/view/CoinNodeFactory.js | 50 ++++++------- js/common/view/CoinTermCreatorBox.js | 14 ++-- js/common/view/CoinTermCreatorBoxFactory.js | 18 ++--- js/common/view/CoinTermCreatorNode.js | 22 +++--- js/common/view/CoinTermHaloNode.js | 20 +++--- js/common/view/CoinTermIconNode.js | 26 +++---- js/common/view/CollectionDisplayNode.js | 10 +-- js/common/view/ConstantCoinTermNode.js | 16 ++--- js/common/view/EditExpressionButton.js | 12 ++-- .../view/ExpressionExplorationScreenView.js | 70 +++++++++---------- js/common/view/ExpressionHintNode.js | 16 ++--- js/common/view/ExpressionManipulationView.js | 30 ++++---- js/common/view/ExpressionNode.js | 24 +++---- js/common/view/ExpressionOverlayNode.js | 28 ++++---- js/common/view/LeftRightNumberSpinner.js | 24 +++---- js/common/view/ShowSubtractionIcon.js | 18 ++--- js/common/view/VariableCoinTermNode.js | 34 ++++----- js/common/view/VariableValueControl.js | 12 ++-- js/explore/EEExploreScreen.js | 22 +++--- js/explore/view/EEExploreIconNode.js | 22 +++--- js/expression-exchange-main.js | 16 ++--- js/expressionExchange.js | 4 +- js/game/EEGameScreen.js | 20 +++--- js/game/model/EEChallengeDescriptors.js | 8 +-- js/game/model/EECollectionArea.js | 18 ++--- js/game/model/EEGameLevel.js | 20 +++--- js/game/model/EEGameModel.js | 16 ++--- js/game/model/ExpressionDescription.js | 10 +-- js/game/model/Term.js | 8 +-- js/game/view/EECollectionAreaNode.js | 12 ++-- js/game/view/EEGameIconNode.js | 28 ++++---- js/game/view/EEGameLevelIconFactory.js | 18 ++--- js/game/view/EEGameLevelView.js | 42 +++++------ js/game/view/EEGameScreenView.js | 24 +++---- js/game/view/EERewardNode.js | 20 +++--- js/game/view/ExpressionDescriptionNode.js | 22 +++--- js/game/view/LevelSelectionNode.js | 26 +++---- js/game/view/NextLevelNode.js | 18 ++--- js/game/view/UndoButton.js | 14 ++-- js/negatives/EENegativesScreen.js | 24 +++---- js/negatives/model/EENegativesModel.js | 12 ++-- js/negatives/view/EENegativesIconNode.js | 24 +++---- 58 files changed, 553 insertions(+), 553 deletions(-) diff --git a/js/basics/EEBasicsScreen.js b/js/basics/EEBasicsScreen.js index aaff24b9..a7427bf7 100644 --- a/js/basics/EEBasicsScreen.js +++ b/js/basics/EEBasicsScreen.js @@ -5,22 +5,22 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var CoinTermCreatorSetID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermCreatorSetID' ); - var EEBasicsIconNode = require( 'EXPRESSION_EXCHANGE/basics/view/EEBasicsIconNode' ); - var EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var ExpressionExplorationScreenView = require( 'EXPRESSION_EXCHANGE/common/view/ExpressionExplorationScreenView' ); - var ExpressionManipulationModel = require( 'EXPRESSION_EXCHANGE/common/model/ExpressionManipulationModel' ); - var inherit = require( 'PHET_CORE/inherit' ); - var Property = require( 'AXON/Property' ); - var Screen = require( 'JOIST/Screen' ); + const CoinTermCreatorSetID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermCreatorSetID' ); + const EEBasicsIconNode = require( 'EXPRESSION_EXCHANGE/basics/view/EEBasicsIconNode' ); + const EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const ExpressionExplorationScreenView = require( 'EXPRESSION_EXCHANGE/common/view/ExpressionExplorationScreenView' ); + const ExpressionManipulationModel = require( 'EXPRESSION_EXCHANGE/common/model/ExpressionManipulationModel' ); + const inherit = require( 'PHET_CORE/inherit' ); + const Property = require( 'AXON/Property' ); + const Screen = require( 'JOIST/Screen' ); // strings - var basicsString = require( 'string!EXPRESSION_EXCHANGE/basics' ); + const basicsString = require( 'string!EXPRESSION_EXCHANGE/basics' ); /** * @constructor diff --git a/js/basics/view/EEBasicsIconNode.js b/js/basics/view/EEBasicsIconNode.js index 685f931f..42af65e4 100644 --- a/js/basics/view/EEBasicsIconNode.js +++ b/js/basics/view/EEBasicsIconNode.js @@ -5,20 +5,20 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var CoinNodeFactory = require( 'EXPRESSION_EXCHANGE/common/view/CoinNodeFactory' ); - var CoinTermTypeID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermTypeID' ); - var EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var inherit = require( 'PHET_CORE/inherit' ); - var MathSymbols = require( 'SCENERY_PHET/MathSymbols' ); - var PhetFont = require( 'SCENERY_PHET/PhetFont' ); - var Rectangle = require( 'SCENERY/nodes/Rectangle' ); - var Screen = require( 'JOIST/Screen' ); - var Text = require( 'SCENERY/nodes/Text' ); + const CoinNodeFactory = require( 'EXPRESSION_EXCHANGE/common/view/CoinNodeFactory' ); + const CoinTermTypeID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermTypeID' ); + const EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const inherit = require( 'PHET_CORE/inherit' ); + const MathSymbols = require( 'SCENERY_PHET/MathSymbols' ); + const PhetFont = require( 'SCENERY_PHET/PhetFont' ); + const Rectangle = require( 'SCENERY/nodes/Rectangle' ); + const Screen = require( 'JOIST/Screen' ); + const Text = require( 'SCENERY/nodes/Text' ); // constants var ICON_SIZE = Screen.MINIMUM_HOME_SCREEN_ICON_SIZE; diff --git a/js/common/EEQueryParameters.js b/js/common/EEQueryParameters.js index e4992fe8..b230d898 100644 --- a/js/common/EEQueryParameters.js +++ b/js/common/EEQueryParameters.js @@ -5,11 +5,11 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); var EEQueryParameters = QueryStringMachine.getAll( { diff --git a/js/common/EESharedConstants.js b/js/common/EESharedConstants.js index b4968772..ace0a14d 100644 --- a/js/common/EESharedConstants.js +++ b/js/common/EESharedConstants.js @@ -4,14 +4,14 @@ * Constants that are shared between the various portions of the Expression Exchange simulation. * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var Bounds2 = require( 'DOT/Bounds2' ); - var Color = require( 'SCENERY/util/Color' ); - var Dimension2 = require( 'DOT/Dimension2' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const Bounds2 = require( 'DOT/Bounds2' ); + const Color = require( 'SCENERY/util/Color' ); + const Dimension2 = require( 'DOT/Dimension2' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); var EESharedConstants = { diff --git a/js/common/enum/AllowedRepresentations.js b/js/common/enum/AllowedRepresentations.js index 44f09248..2e5ccfbf 100644 --- a/js/common/enum/AllowedRepresentations.js +++ b/js/common/enum/AllowedRepresentations.js @@ -5,11 +5,11 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); var AllowedRepresentations = { COINS_ONLY: 'COINS_ONLY', diff --git a/js/common/enum/CoinTermCreatorSetID.js b/js/common/enum/CoinTermCreatorSetID.js index 7b155815..a6265ab9 100644 --- a/js/common/enum/CoinTermCreatorSetID.js +++ b/js/common/enum/CoinTermCreatorSetID.js @@ -5,11 +5,11 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); var CoinTermCreatorSetID = { BASICS: 'BASICS', diff --git a/js/common/enum/CoinTermTypeID.js b/js/common/enum/CoinTermTypeID.js index cd14eb32..17a39a44 100644 --- a/js/common/enum/CoinTermTypeID.js +++ b/js/common/enum/CoinTermTypeID.js @@ -4,11 +4,11 @@ * enum that defines the different types of coin terms * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); var CoinTermTypeID = { X: 'X', diff --git a/js/common/enum/ViewMode.js b/js/common/enum/ViewMode.js index d632d08d..d433230d 100644 --- a/js/common/enum/ViewMode.js +++ b/js/common/enum/ViewMode.js @@ -5,11 +5,11 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); var ViewMode = { COINS: 'COINS', diff --git a/js/common/model/AnimationSpec.js b/js/common/model/AnimationSpec.js index 2a2e7c73..5eb84cbf 100644 --- a/js/common/model/AnimationSpec.js +++ b/js/common/model/AnimationSpec.js @@ -5,12 +5,12 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var inherit = require( 'PHET_CORE/inherit' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const inherit = require( 'PHET_CORE/inherit' ); /** * @param {Vector2} startPosition - the location from which the animation should begin diff --git a/js/common/model/CoinTerm.js b/js/common/model/CoinTerm.js index 59d068e2..06d01379 100644 --- a/js/common/model/CoinTerm.js +++ b/js/common/model/CoinTerm.js @@ -8,20 +8,20 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var AnimationSpec = require( 'EXPRESSION_EXCHANGE/common/model/AnimationSpec' ); - var CoinTermTypeID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermTypeID' ); - var Easing = require( 'TWIXT/Easing' ); - var EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); - var Emitter = require( 'AXON/Emitter' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var inherit = require( 'PHET_CORE/inherit' ); - var Property = require( 'AXON/Property' ); - var Vector2 = require( 'DOT/Vector2' ); - var Vector2Property = require( 'DOT/Vector2Property' ); + const AnimationSpec = require( 'EXPRESSION_EXCHANGE/common/model/AnimationSpec' ); + const CoinTermTypeID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermTypeID' ); + const Easing = require( 'TWIXT/Easing' ); + const EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); + const Emitter = require( 'AXON/Emitter' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const inherit = require( 'PHET_CORE/inherit' ); + const Property = require( 'AXON/Property' ); + const Vector2 = require( 'DOT/Vector2' ); + const Vector2Property = require( 'DOT/Vector2Property' ); // constants var COIN_TERM_FADE_TIME = 0.75; // in seconds diff --git a/js/common/model/CoinTermFactory.js b/js/common/model/CoinTermFactory.js index d5544c78..9424b70e 100644 --- a/js/common/model/CoinTermFactory.js +++ b/js/common/model/CoinTermFactory.js @@ -8,16 +8,16 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var CoinTerm = require( 'EXPRESSION_EXCHANGE/common/model/CoinTerm' ); - var CoinTermTypeID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermTypeID' ); - var DerivedProperty = require( 'AXON/DerivedProperty' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var inherit = require( 'PHET_CORE/inherit' ); - var Property = require( 'AXON/Property' ); + const CoinTerm = require( 'EXPRESSION_EXCHANGE/common/model/CoinTerm' ); + const CoinTermTypeID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermTypeID' ); + const DerivedProperty = require( 'AXON/DerivedProperty' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const inherit = require( 'PHET_CORE/inherit' ); + const Property = require( 'AXON/Property' ); // constants var CONSTANT_ONE_VALUE_PROPERTY = new Property( 1 ); diff --git a/js/common/model/Expression.js b/js/common/model/Expression.js index b1fdcd70..30ef53cd 100644 --- a/js/common/model/Expression.js +++ b/js/common/model/Expression.js @@ -6,22 +6,22 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var AnimationSpec = require( 'EXPRESSION_EXCHANGE/common/model/AnimationSpec' ); - var Bounds2 = require( 'DOT/Bounds2' ); - var DerivedProperty = require( 'AXON/DerivedProperty' ); - var Easing = require( 'TWIXT/Easing' ); - var EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); - var Emitter = require( 'AXON/Emitter' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var inherit = require( 'PHET_CORE/inherit' ); - var ObservableArray = require( 'AXON/ObservableArray' ); - var Property = require( 'AXON/Property' ); - var Vector2 = require( 'DOT/Vector2' ); - var Vector2Property = require( 'DOT/Vector2Property' ); + const AnimationSpec = require( 'EXPRESSION_EXCHANGE/common/model/AnimationSpec' ); + const Bounds2 = require( 'DOT/Bounds2' ); + const DerivedProperty = require( 'AXON/DerivedProperty' ); + const Easing = require( 'TWIXT/Easing' ); + const EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); + const Emitter = require( 'AXON/Emitter' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const inherit = require( 'PHET_CORE/inherit' ); + const ObservableArray = require( 'AXON/ObservableArray' ); + const Property = require( 'AXON/Property' ); + const Vector2 = require( 'DOT/Vector2' ); + const Vector2Property = require( 'DOT/Vector2Property' ); // constants var INTER_COIN_TERM_SPACING = 30; // in model units, empirically determined diff --git a/js/common/model/ExpressionHint.js b/js/common/model/ExpressionHint.js index 1b67538c..dbb16e08 100644 --- a/js/common/model/ExpressionHint.js +++ b/js/common/model/ExpressionHint.js @@ -5,12 +5,12 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var inherit = require( 'PHET_CORE/inherit' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const inherit = require( 'PHET_CORE/inherit' ); /** * @param {CoinTerm} anchorCoinTerm - the coin term that is staying put as this expression is being formed diff --git a/js/common/model/ExpressionManipulationModel.js b/js/common/model/ExpressionManipulationModel.js index 747b8347..912d4562 100644 --- a/js/common/model/ExpressionManipulationModel.js +++ b/js/common/model/ExpressionManipulationModel.js @@ -8,23 +8,23 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var AllowedRepresentations = require( 'EXPRESSION_EXCHANGE/common/enum/AllowedRepresentations' ); - var Bounds2 = require( 'DOT/Bounds2' ); - var CoinTermFactory = require( 'EXPRESSION_EXCHANGE/common/model/CoinTermFactory' ); - var CoinTermTypeID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermTypeID' ); - var EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); - var Expression = require( 'EXPRESSION_EXCHANGE/common/model/Expression' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var ExpressionHint = require( 'EXPRESSION_EXCHANGE/common/model/ExpressionHint' ); - var inherit = require( 'PHET_CORE/inherit' ); - var ObservableArray = require( 'AXON/ObservableArray' ); - var Property = require( 'AXON/Property' ); - var Vector2 = require( 'DOT/Vector2' ); - var ViewMode = require( 'EXPRESSION_EXCHANGE/common/enum/ViewMode' ); + const AllowedRepresentations = require( 'EXPRESSION_EXCHANGE/common/enum/AllowedRepresentations' ); + const Bounds2 = require( 'DOT/Bounds2' ); + const CoinTermFactory = require( 'EXPRESSION_EXCHANGE/common/model/CoinTermFactory' ); + const CoinTermTypeID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermTypeID' ); + const EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); + const Expression = require( 'EXPRESSION_EXCHANGE/common/model/Expression' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const ExpressionHint = require( 'EXPRESSION_EXCHANGE/common/model/ExpressionHint' ); + const inherit = require( 'PHET_CORE/inherit' ); + const ObservableArray = require( 'AXON/ObservableArray' ); + const Property = require( 'AXON/Property' ); + const Vector2 = require( 'DOT/Vector2' ); + const ViewMode = require( 'EXPRESSION_EXCHANGE/common/enum/ViewMode' ); // constants var BREAK_APART_SPACING = 10; diff --git a/js/common/view/AbstractCoinTermNode.js b/js/common/view/AbstractCoinTermNode.js index e952c73d..511a1d9e 100644 --- a/js/common/view/AbstractCoinTermNode.js +++ b/js/common/view/AbstractCoinTermNode.js @@ -5,22 +5,22 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var Bounds2 = require( 'DOT/Bounds2' ); - var BreakApartButton = require( 'EXPRESSION_EXCHANGE/common/view/BreakApartButton' ); - var EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var inherit = require( 'PHET_CORE/inherit' ); - var MovableDragHandler = require( 'SCENERY_PHET/input/MovableDragHandler' ); - var Node = require( 'SCENERY/nodes/Node' ); - var Property = require( 'AXON/Property' ); - var Rectangle = require( 'SCENERY/nodes/Rectangle' ); - var timer = require( 'AXON/timer' ); - var Touch = require( 'SCENERY/input/Touch' ); - var Vector2 = require( 'DOT/Vector2' ); + const Bounds2 = require( 'DOT/Bounds2' ); + const BreakApartButton = require( 'EXPRESSION_EXCHANGE/common/view/BreakApartButton' ); + const EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const inherit = require( 'PHET_CORE/inherit' ); + const MovableDragHandler = require( 'SCENERY_PHET/input/MovableDragHandler' ); + const Node = require( 'SCENERY/nodes/Node' ); + const Property = require( 'AXON/Property' ); + const Rectangle = require( 'SCENERY/nodes/Rectangle' ); + const timer = require( 'AXON/timer' ); + const Touch = require( 'SCENERY/input/Touch' ); + const Vector2 = require( 'DOT/Vector2' ); // constants var BACKGROUND_CORNER_ROUNDING = 5; diff --git a/js/common/view/BreakApartButton.js b/js/common/view/BreakApartButton.js index cede8a88..6dc98ec8 100644 --- a/js/common/view/BreakApartButton.js +++ b/js/common/view/BreakApartButton.js @@ -4,15 +4,15 @@ * button used for breaking things apart, supports a normal and color inverted appearance * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var FontAwesomeNode = require( 'SUN/FontAwesomeNode' ); - var inherit = require( 'PHET_CORE/inherit' ); - var Node = require( 'SCENERY/nodes/Node' ); - var RectangularPushButton = require( 'SUN/buttons/RectangularPushButton' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const FontAwesomeNode = require( 'SUN/FontAwesomeNode' ); + const inherit = require( 'PHET_CORE/inherit' ); + const Node = require( 'SCENERY/nodes/Node' ); + const RectangularPushButton = require( 'SUN/buttons/RectangularPushButton' ); // constants var MARGIN = 3.5; diff --git a/js/common/view/CoinNodeFactory.js b/js/common/view/CoinNodeFactory.js index e34f2f8b..2e740cfa 100644 --- a/js/common/view/CoinNodeFactory.js +++ b/js/common/view/CoinNodeFactory.js @@ -4,38 +4,38 @@ * static object that provides functions for creating nodes that represent the coins used in the simulation * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var Circle = require( 'SCENERY/nodes/Circle' ); - var CoinTermTypeID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermTypeID' ); - var Color = require( 'SCENERY/util/Color' ); - var EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var Image = require( 'SCENERY/nodes/Image' ); - var Path = require( 'SCENERY/nodes/Path' ); - var platform = require( 'PHET_CORE/platform' ); - var Shape = require( 'KITE/Shape' ); - var Vector2 = require( 'DOT/Vector2' ); + const Circle = require( 'SCENERY/nodes/Circle' ); + const CoinTermTypeID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermTypeID' ); + const Color = require( 'SCENERY/util/Color' ); + const EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const Image = require( 'SCENERY/nodes/Image' ); + const Path = require( 'SCENERY/nodes/Path' ); + const platform = require( 'PHET_CORE/platform' ); + const Shape = require( 'KITE/Shape' ); + const Vector2 = require( 'DOT/Vector2' ); // images - use mipmaps normally, but use regular images when memory needs to be conserved var useMipmaps = !platform.mobileSafari; if ( useMipmaps ) { - var coinXBackImage = require( 'mipmap!EXPRESSION_EXCHANGE/coin-x-back.png' ); - var coinXFrontImage = require( 'mipmap!EXPRESSION_EXCHANGE/coin-x.png' ); - var coinXSquaredBackImage = require( 'mipmap!EXPRESSION_EXCHANGE/coin-x-squared-back.png' ); - var coinXSquaredFrontImage = require( 'mipmap!EXPRESSION_EXCHANGE/coin-x-squared.png' ); - var coinXSquaredYSquaredBackImage = require( 'mipmap!EXPRESSION_EXCHANGE/coin-x-squared-y-squared-back.png' ); - var coinXSquaredYSquaredFrontImage = require( 'mipmap!EXPRESSION_EXCHANGE/coin-x-squared-y-squared.png' ); - var coinXYBackImage = require( 'mipmap!EXPRESSION_EXCHANGE/coin-xy-back.png' ); - var coinXYFrontImage = require( 'mipmap!EXPRESSION_EXCHANGE/coin-xy.png' ); - var coinYBackImage = require( 'mipmap!EXPRESSION_EXCHANGE/coin-y-back.png' ); - var coinYFrontImage = require( 'mipmap!EXPRESSION_EXCHANGE/coin-y.png' ); - var coinYSquaredBackImage = require( 'mipmap!EXPRESSION_EXCHANGE/coin-y-squared-back.png' ); - var coinYSquaredFrontImage = require( 'mipmap!EXPRESSION_EXCHANGE/coin-y-squared.png' ); - var coinZBackImage = require( 'mipmap!EXPRESSION_EXCHANGE/coin-z-back.png' ); - var coinZFrontImage = require( 'mipmap!EXPRESSION_EXCHANGE/coin-z.png' ); + const coinXBackImage = require( 'mipmap!EXPRESSION_EXCHANGE/coin-x-back.png' ); + const coinXFrontImage = require( 'mipmap!EXPRESSION_EXCHANGE/coin-x.png' ); + const coinXSquaredBackImage = require( 'mipmap!EXPRESSION_EXCHANGE/coin-x-squared-back.png' ); + const coinXSquaredFrontImage = require( 'mipmap!EXPRESSION_EXCHANGE/coin-x-squared.png' ); + const coinXSquaredYSquaredBackImage = require( 'mipmap!EXPRESSION_EXCHANGE/coin-x-squared-y-squared-back.png' ); + const coinXSquaredYSquaredFrontImage = require( 'mipmap!EXPRESSION_EXCHANGE/coin-x-squared-y-squared.png' ); + const coinXYBackImage = require( 'mipmap!EXPRESSION_EXCHANGE/coin-xy-back.png' ); + const coinXYFrontImage = require( 'mipmap!EXPRESSION_EXCHANGE/coin-xy.png' ); + const coinYBackImage = require( 'mipmap!EXPRESSION_EXCHANGE/coin-y-back.png' ); + const coinYFrontImage = require( 'mipmap!EXPRESSION_EXCHANGE/coin-y.png' ); + const coinYSquaredBackImage = require( 'mipmap!EXPRESSION_EXCHANGE/coin-y-squared-back.png' ); + const coinYSquaredFrontImage = require( 'mipmap!EXPRESSION_EXCHANGE/coin-y-squared.png' ); + const coinZBackImage = require( 'mipmap!EXPRESSION_EXCHANGE/coin-z-back.png' ); + const coinZFrontImage = require( 'mipmap!EXPRESSION_EXCHANGE/coin-z.png' ); } else { coinXBackImage = require( 'image!EXPRESSION_EXCHANGE/coin-x-back.png' ); diff --git a/js/common/view/CoinTermCreatorBox.js b/js/common/view/CoinTermCreatorBox.js index 058cf8d7..a9895e54 100644 --- a/js/common/view/CoinTermCreatorBox.js +++ b/js/common/view/CoinTermCreatorBox.js @@ -8,16 +8,16 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var Carousel = require( 'SUN/Carousel' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var HBox = require( 'SCENERY/nodes/HBox' ); - var inherit = require( 'PHET_CORE/inherit' ); - var Node = require( 'SCENERY/nodes/Node' ); - var Panel = require( 'SUN/Panel' ); + const Carousel = require( 'SUN/Carousel' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const HBox = require( 'SCENERY/nodes/HBox' ); + const inherit = require( 'PHET_CORE/inherit' ); + const Node = require( 'SCENERY/nodes/Node' ); + const Panel = require( 'SUN/Panel' ); /** * @param {Array.} creatorNodes - set of coin term creator nodes diff --git a/js/common/view/CoinTermCreatorBoxFactory.js b/js/common/view/CoinTermCreatorBoxFactory.js index e658d147..7f068653 100644 --- a/js/common/view/CoinTermCreatorBoxFactory.js +++ b/js/common/view/CoinTermCreatorBoxFactory.js @@ -9,18 +9,18 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var CoinTermCreatorBox = require( 'EXPRESSION_EXCHANGE/common/view/CoinTermCreatorBox' ); - var CoinTermCreatorNode = require( 'EXPRESSION_EXCHANGE/common/view/CoinTermCreatorNode' ); - var CoinTermCreatorSetID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermCreatorSetID' ); - var CoinTermTypeID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermTypeID' ); - var DerivedProperty = require( 'AXON/DerivedProperty' ); - var EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var Property = require( 'AXON/Property' ); + const CoinTermCreatorBox = require( 'EXPRESSION_EXCHANGE/common/view/CoinTermCreatorBox' ); + const CoinTermCreatorNode = require( 'EXPRESSION_EXCHANGE/common/view/CoinTermCreatorNode' ); + const CoinTermCreatorSetID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermCreatorSetID' ); + const CoinTermTypeID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermTypeID' ); + const DerivedProperty = require( 'AXON/DerivedProperty' ); + const EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const Property = require( 'AXON/Property' ); // constants var CREATION_LIMIT_FOR_EXPLORE_SCREENS = 8; diff --git a/js/common/view/CoinTermCreatorNode.js b/js/common/view/CoinTermCreatorNode.js index 901c6b54..9295f37b 100644 --- a/js/common/view/CoinTermCreatorNode.js +++ b/js/common/view/CoinTermCreatorNode.js @@ -9,20 +9,20 @@ * and derive subclasses to handle sim-specific behavior, or have some sort of options that could make it work in all * cases. */ -define( function( require ) { +define( require => { 'use strict'; // modules - var Bounds2 = require( 'DOT/Bounds2' ); - var CoinTermTypeID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermTypeID' ); - var ConstantCoinTermNode = require( 'EXPRESSION_EXCHANGE/common/view/ConstantCoinTermNode' ); - var Emitter = require( 'AXON/Emitter' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var inherit = require( 'PHET_CORE/inherit' ); - var Node = require( 'SCENERY/nodes/Node' ); - var Property = require( 'AXON/Property' ); - var VariableCoinTermNode = require( 'EXPRESSION_EXCHANGE/common/view/VariableCoinTermNode' ); - var Vector2 = require( 'DOT/Vector2' ); + const Bounds2 = require( 'DOT/Bounds2' ); + const CoinTermTypeID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermTypeID' ); + const ConstantCoinTermNode = require( 'EXPRESSION_EXCHANGE/common/view/ConstantCoinTermNode' ); + const Emitter = require( 'AXON/Emitter' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const inherit = require( 'PHET_CORE/inherit' ); + const Node = require( 'SCENERY/nodes/Node' ); + const Property = require( 'AXON/Property' ); + const VariableCoinTermNode = require( 'EXPRESSION_EXCHANGE/common/view/VariableCoinTermNode' ); + const Vector2 = require( 'DOT/Vector2' ); // constants var STAGGER_OFFSET = 3; // in screen coordinates, empirically determined for optimal look diff --git a/js/common/view/CoinTermHaloNode.js b/js/common/view/CoinTermHaloNode.js index d887367c..f5e01b2e 100644 --- a/js/common/view/CoinTermHaloNode.js +++ b/js/common/view/CoinTermHaloNode.js @@ -5,19 +5,19 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var Circle = require( 'SCENERY/nodes/Circle' ); - var DerivedProperty = require( 'AXON/DerivedProperty' ); - var EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var inherit = require( 'PHET_CORE/inherit' ); - var Node = require( 'SCENERY/nodes/Node' ); - var Property = require( 'AXON/Property' ); - var RadialGradient = require( 'SCENERY/util/RadialGradient' ); - var ViewMode = require( 'EXPRESSION_EXCHANGE/common/enum/ViewMode' ); + const Circle = require( 'SCENERY/nodes/Circle' ); + const DerivedProperty = require( 'AXON/DerivedProperty' ); + const EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const inherit = require( 'PHET_CORE/inherit' ); + const Node = require( 'SCENERY/nodes/Node' ); + const Property = require( 'AXON/Property' ); + const RadialGradient = require( 'SCENERY/util/RadialGradient' ); + const ViewMode = require( 'EXPRESSION_EXCHANGE/common/enum/ViewMode' ); // constants var COIN_HALO_COLOR = 'rgba( 255, 255, 0, 0.8 )'; diff --git a/js/common/view/CoinTermIconNode.js b/js/common/view/CoinTermIconNode.js index 7f52a509..50ab361f 100644 --- a/js/common/view/CoinTermIconNode.js +++ b/js/common/view/CoinTermIconNode.js @@ -5,22 +5,22 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var CoinNodeFactory = require( 'EXPRESSION_EXCHANGE/common/view/CoinNodeFactory' ); - var DerivedProperty = require( 'AXON/DerivedProperty' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var inherit = require( 'PHET_CORE/inherit' ); - var MathSymbolFont = require( 'SCENERY_PHET/MathSymbolFont' ); - var MathSymbols = require( 'SCENERY_PHET/MathSymbols' ); - var Node = require( 'SCENERY/nodes/Node' ); - var PhetFont = require( 'SCENERY_PHET/PhetFont' ); - var Property = require( 'AXON/Property' ); - var RichText = require( 'SCENERY/nodes/RichText' ); - var Text = require( 'SCENERY/nodes/Text' ); - var ViewMode = require( 'EXPRESSION_EXCHANGE/common/enum/ViewMode' ); + const CoinNodeFactory = require( 'EXPRESSION_EXCHANGE/common/view/CoinNodeFactory' ); + const DerivedProperty = require( 'AXON/DerivedProperty' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const inherit = require( 'PHET_CORE/inherit' ); + const MathSymbolFont = require( 'SCENERY_PHET/MathSymbolFont' ); + const MathSymbols = require( 'SCENERY_PHET/MathSymbols' ); + const Node = require( 'SCENERY/nodes/Node' ); + const PhetFont = require( 'SCENERY_PHET/PhetFont' ); + const Property = require( 'AXON/Property' ); + const RichText = require( 'SCENERY/nodes/RichText' ); + const Text = require( 'SCENERY/nodes/Text' ); + const ViewMode = require( 'EXPRESSION_EXCHANGE/common/enum/ViewMode' ); // constants var COIN_VALUE_FONT = new PhetFont( { size: 12, weight: 'bold' } ); diff --git a/js/common/view/CollectionDisplayNode.js b/js/common/view/CollectionDisplayNode.js index 86fe75c6..daff3971 100644 --- a/js/common/view/CollectionDisplayNode.js +++ b/js/common/view/CollectionDisplayNode.js @@ -4,14 +4,14 @@ * a node that monitors the coin terms in the model and displays a summary of what has been created (a.k.a. "collected") * by the user */ -define( function( require ) { +define( require => { 'use strict'; // modules - var CoinTermIconNode = require( 'EXPRESSION_EXCHANGE/common/view/CoinTermIconNode' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var inherit = require( 'PHET_CORE/inherit' ); - var Node = require( 'SCENERY/nodes/Node' ); + const CoinTermIconNode = require( 'EXPRESSION_EXCHANGE/common/view/CoinTermIconNode' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const inherit = require( 'PHET_CORE/inherit' ); + const Node = require( 'SCENERY/nodes/Node' ); // constants var DEFAULT_WIDTH = 200; // empirically determined diff --git a/js/common/view/ConstantCoinTermNode.js b/js/common/view/ConstantCoinTermNode.js index 9b026527..7088a58d 100644 --- a/js/common/view/ConstantCoinTermNode.js +++ b/js/common/view/ConstantCoinTermNode.js @@ -5,17 +5,17 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var AbstractCoinTermNode = require( 'EXPRESSION_EXCHANGE/common/view/AbstractCoinTermNode' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var inherit = require( 'PHET_CORE/inherit' ); - var PhetFont = require( 'SCENERY_PHET/PhetFont' ); - var Property = require( 'AXON/Property' ); - var Text = require( 'SCENERY/nodes/Text' ); - var ViewMode = require( 'EXPRESSION_EXCHANGE/common/enum/ViewMode' ); + const AbstractCoinTermNode = require( 'EXPRESSION_EXCHANGE/common/view/AbstractCoinTermNode' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const inherit = require( 'PHET_CORE/inherit' ); + const PhetFont = require( 'SCENERY_PHET/PhetFont' ); + const Property = require( 'AXON/Property' ); + const Text = require( 'SCENERY/nodes/Text' ); + const ViewMode = require( 'EXPRESSION_EXCHANGE/common/enum/ViewMode' ); // constants var VALUE_FONT = new PhetFont( { size: 34 } ); diff --git a/js/common/view/EditExpressionButton.js b/js/common/view/EditExpressionButton.js index 28afd9a1..7f8b987a 100644 --- a/js/common/view/EditExpressionButton.js +++ b/js/common/view/EditExpressionButton.js @@ -3,15 +3,15 @@ /** * button used for putting expressions into edit mode */ -define( function( require ) { +define( require => { 'use strict'; // modules - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var FontAwesomeNode = require( 'SUN/FontAwesomeNode' ); - var inherit = require( 'PHET_CORE/inherit' ); - var Node = require( 'SCENERY/nodes/Node' ); - var RectangularPushButton = require( 'SUN/buttons/RectangularPushButton' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const FontAwesomeNode = require( 'SUN/FontAwesomeNode' ); + const inherit = require( 'PHET_CORE/inherit' ); + const Node = require( 'SCENERY/nodes/Node' ); + const RectangularPushButton = require( 'SUN/buttons/RectangularPushButton' ); // constants var ICON = new FontAwesomeNode( 'exchange', { scale: 0.35 } ); // scale empirically determined diff --git a/js/common/view/ExpressionExplorationScreenView.js b/js/common/view/ExpressionExplorationScreenView.js index ddfc3ae6..bdd4e905 100644 --- a/js/common/view/ExpressionExplorationScreenView.js +++ b/js/common/view/ExpressionExplorationScreenView.js @@ -6,48 +6,48 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var ABSwitch = require( 'SUN/ABSwitch' ); - var AccordionBox = require( 'SUN/AccordionBox' ); - var AllowedRepresentations = require( 'EXPRESSION_EXCHANGE/common/enum/AllowedRepresentations' ); - var Checkbox = require( 'SUN/Checkbox' ); - var CoinTermCreatorBoxFactory = require( 'EXPRESSION_EXCHANGE/common/view/CoinTermCreatorBoxFactory' ); - var CoinTermCreatorSetID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermCreatorSetID' ); - var CollectionDisplayNode = require( 'EXPRESSION_EXCHANGE/common/view/CollectionDisplayNode' ); - var Dimension2 = require( 'DOT/Dimension2' ); - var EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var ExpressionManipulationView = require( 'EXPRESSION_EXCHANGE/common/view/ExpressionManipulationView' ); - var Image = require( 'SCENERY/nodes/Image' ); - var inherit = require( 'PHET_CORE/inherit' ); - var MathSymbolFont = require( 'SCENERY_PHET/MathSymbolFont' ); - var Node = require( 'SCENERY/nodes/Node' ); - var Panel = require( 'SUN/Panel' ); - var PhetFont = require( 'SCENERY_PHET/PhetFont' ); - var Property = require( 'AXON/Property' ); - var ResetAllButton = require( 'SCENERY_PHET/buttons/ResetAllButton' ); - var ScreenView = require( 'JOIST/ScreenView' ); - var ShowSubtractionIcon = require( 'EXPRESSION_EXCHANGE/common/view/ShowSubtractionIcon' ); - var StringUtils = require( 'PHETCOMMON/util/StringUtils' ); - var Text = require( 'SCENERY/nodes/Text' ); - var VariableValueControl = require( 'EXPRESSION_EXCHANGE/common/view/VariableValueControl' ); - var ViewMode = require( 'EXPRESSION_EXCHANGE/common/enum/ViewMode' ); - var VStrut = require( 'SCENERY/nodes/VStrut' ); + const ABSwitch = require( 'SUN/ABSwitch' ); + const AccordionBox = require( 'SUN/AccordionBox' ); + const AllowedRepresentations = require( 'EXPRESSION_EXCHANGE/common/enum/AllowedRepresentations' ); + const Checkbox = require( 'SUN/Checkbox' ); + const CoinTermCreatorBoxFactory = require( 'EXPRESSION_EXCHANGE/common/view/CoinTermCreatorBoxFactory' ); + const CoinTermCreatorSetID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermCreatorSetID' ); + const CollectionDisplayNode = require( 'EXPRESSION_EXCHANGE/common/view/CollectionDisplayNode' ); + const Dimension2 = require( 'DOT/Dimension2' ); + const EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const ExpressionManipulationView = require( 'EXPRESSION_EXCHANGE/common/view/ExpressionManipulationView' ); + const Image = require( 'SCENERY/nodes/Image' ); + const inherit = require( 'PHET_CORE/inherit' ); + const MathSymbolFont = require( 'SCENERY_PHET/MathSymbolFont' ); + const Node = require( 'SCENERY/nodes/Node' ); + const Panel = require( 'SUN/Panel' ); + const PhetFont = require( 'SCENERY_PHET/PhetFont' ); + const Property = require( 'AXON/Property' ); + const ResetAllButton = require( 'SCENERY_PHET/buttons/ResetAllButton' ); + const ScreenView = require( 'JOIST/ScreenView' ); + const ShowSubtractionIcon = require( 'EXPRESSION_EXCHANGE/common/view/ShowSubtractionIcon' ); + const StringUtils = require( 'PHETCOMMON/util/StringUtils' ); + const Text = require( 'SCENERY/nodes/Text' ); + const VariableValueControl = require( 'EXPRESSION_EXCHANGE/common/view/VariableValueControl' ); + const ViewMode = require( 'EXPRESSION_EXCHANGE/common/enum/ViewMode' ); + const VStrut = require( 'SCENERY/nodes/VStrut' ); // strings - var allCoefficientsString = require( 'string!EXPRESSION_EXCHANGE/allCoefficients' ); - var coinValuesString = require( 'string!EXPRESSION_EXCHANGE/coinValues' ); - var myCollectionString = require( 'string!EXPRESSION_EXCHANGE/myCollection' ); - var numberCentsPatternString = require( 'string!EXPRESSION_EXCHANGE/numberCentsPattern' ); - var totalString = require( 'string!EXPRESSION_EXCHANGE/total' ); - var variablesString = require( 'string!EXPRESSION_EXCHANGE/variables' ); - var variableValuesString = require( 'string!EXPRESSION_EXCHANGE/variableValues' ); + const allCoefficientsString = require( 'string!EXPRESSION_EXCHANGE/allCoefficients' ); + const coinValuesString = require( 'string!EXPRESSION_EXCHANGE/coinValues' ); + const myCollectionString = require( 'string!EXPRESSION_EXCHANGE/myCollection' ); + const numberCentsPatternString = require( 'string!EXPRESSION_EXCHANGE/numberCentsPattern' ); + const totalString = require( 'string!EXPRESSION_EXCHANGE/total' ); + const variablesString = require( 'string!EXPRESSION_EXCHANGE/variables' ); + const variableValuesString = require( 'string!EXPRESSION_EXCHANGE/variableValues' ); // images - var switchCoinImage = require( 'mipmap!EXPRESSION_EXCHANGE/switch-coin.png' ); + const switchCoinImage = require( 'mipmap!EXPRESSION_EXCHANGE/switch-coin.png' ); // constants var ACCORDION_BOX_TITLE_FONT = new PhetFont( { size: 16, weight: 'bold' } ); diff --git a/js/common/view/ExpressionHintNode.js b/js/common/view/ExpressionHintNode.js index 8d64f277..c3356c73 100644 --- a/js/common/view/ExpressionHintNode.js +++ b/js/common/view/ExpressionHintNode.js @@ -7,17 +7,17 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var inherit = require( 'PHET_CORE/inherit' ); - var Node = require( 'SCENERY/nodes/Node' ); - var Path = require( 'SCENERY/nodes/Path' ); - var Property = require( 'AXON/Property' ); - var Shape = require( 'KITE/Shape' ); + const EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const inherit = require( 'PHET_CORE/inherit' ); + const Node = require( 'SCENERY/nodes/Node' ); + const Path = require( 'SCENERY/nodes/Path' ); + const Property = require( 'AXON/Property' ); + const Shape = require( 'KITE/Shape' ); // constants var HINT_BACKGROUND_COLOR = EESharedConstants.EXPRESSION_BACKGROUND_COLOR; diff --git a/js/common/view/ExpressionManipulationView.js b/js/common/view/ExpressionManipulationView.js index 4227d4ca..0e8f5565 100644 --- a/js/common/view/ExpressionManipulationView.js +++ b/js/common/view/ExpressionManipulationView.js @@ -5,24 +5,24 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var CoinTermHaloNode = require( 'EXPRESSION_EXCHANGE/common/view/CoinTermHaloNode' ); - var ConstantCoinTermNode = require( 'EXPRESSION_EXCHANGE/common/view/ConstantCoinTermNode' ); - var EECollectionAreaNode = require( 'EXPRESSION_EXCHANGE/game/view/EECollectionAreaNode' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var ExpressionHintNode = require( 'EXPRESSION_EXCHANGE/common/view/ExpressionHintNode' ); - var ExpressionNode = require( 'EXPRESSION_EXCHANGE/common/view/ExpressionNode' ); - var ExpressionOverlayNode = require( 'EXPRESSION_EXCHANGE/common/view/ExpressionOverlayNode' ); - var inherit = require( 'PHET_CORE/inherit' ); - var Node = require( 'SCENERY/nodes/Node' ); - var Path = require( 'SCENERY/nodes/Path' ); - var Property = require( 'AXON/Property' ); - var Shape = require( 'KITE/Shape' ); - var UndoButton = require( 'EXPRESSION_EXCHANGE/game/view/UndoButton' ); - var VariableCoinTermNode = require( 'EXPRESSION_EXCHANGE/common/view/VariableCoinTermNode' ); + const CoinTermHaloNode = require( 'EXPRESSION_EXCHANGE/common/view/CoinTermHaloNode' ); + const ConstantCoinTermNode = require( 'EXPRESSION_EXCHANGE/common/view/ConstantCoinTermNode' ); + const EECollectionAreaNode = require( 'EXPRESSION_EXCHANGE/game/view/EECollectionAreaNode' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const ExpressionHintNode = require( 'EXPRESSION_EXCHANGE/common/view/ExpressionHintNode' ); + const ExpressionNode = require( 'EXPRESSION_EXCHANGE/common/view/ExpressionNode' ); + const ExpressionOverlayNode = require( 'EXPRESSION_EXCHANGE/common/view/ExpressionOverlayNode' ); + const inherit = require( 'PHET_CORE/inherit' ); + const Node = require( 'SCENERY/nodes/Node' ); + const Path = require( 'SCENERY/nodes/Path' ); + const Property = require( 'AXON/Property' ); + const Shape = require( 'KITE/Shape' ); + const UndoButton = require( 'EXPRESSION_EXCHANGE/game/view/UndoButton' ); + const VariableCoinTermNode = require( 'EXPRESSION_EXCHANGE/common/view/VariableCoinTermNode' ); /** * @param {ExpressionManipulationModel} model diff --git a/js/common/view/ExpressionNode.js b/js/common/view/ExpressionNode.js index d2220909..d4f66b4a 100644 --- a/js/common/view/ExpressionNode.js +++ b/js/common/view/ExpressionNode.js @@ -9,21 +9,21 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var inherit = require( 'PHET_CORE/inherit' ); - var MathSymbols = require( 'SCENERY_PHET/MathSymbols' ); - var Matrix3 = require( 'DOT/Matrix3' ); - var Node = require( 'SCENERY/nodes/Node' ); - var Path = require( 'SCENERY/nodes/Path' ); - var PhetFont = require( 'SCENERY_PHET/PhetFont' ); - var Property = require( 'AXON/Property' ); - var Shape = require( 'KITE/Shape' ); - var Text = require( 'SCENERY/nodes/Text' ); + const EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const inherit = require( 'PHET_CORE/inherit' ); + const MathSymbols = require( 'SCENERY_PHET/MathSymbols' ); + const Matrix3 = require( 'DOT/Matrix3' ); + const Node = require( 'SCENERY/nodes/Node' ); + const Path = require( 'SCENERY/nodes/Path' ); + const PhetFont = require( 'SCENERY_PHET/PhetFont' ); + const Property = require( 'AXON/Property' ); + const Shape = require( 'KITE/Shape' ); + const Text = require( 'SCENERY/nodes/Text' ); // constants var BACKGROUND_COLOR = EESharedConstants.EXPRESSION_BACKGROUND_COLOR; diff --git a/js/common/view/ExpressionOverlayNode.js b/js/common/view/ExpressionOverlayNode.js index 75f18c73..76eaf973 100644 --- a/js/common/view/ExpressionOverlayNode.js +++ b/js/common/view/ExpressionOverlayNode.js @@ -6,23 +6,23 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var BreakApartButton = require( 'EXPRESSION_EXCHANGE/common/view/BreakApartButton' ); - var EditExpressionButton = require( 'EXPRESSION_EXCHANGE/common/view/EditExpressionButton' ); - var EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var inherit = require( 'PHET_CORE/inherit' ); - var Node = require( 'SCENERY/nodes/Node' ); - var Path = require( 'SCENERY/nodes/Path' ); - var Property = require( 'AXON/Property' ); - var Shape = require( 'KITE/Shape' ); - var SimpleDragHandler = require( 'SCENERY/input/SimpleDragHandler' ); - var timer = require( 'AXON/timer' ); - var Util = require( 'DOT/Util' ); - var Vector2 = require( 'DOT/Vector2' ); + const BreakApartButton = require( 'EXPRESSION_EXCHANGE/common/view/BreakApartButton' ); + const EditExpressionButton = require( 'EXPRESSION_EXCHANGE/common/view/EditExpressionButton' ); + const EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const inherit = require( 'PHET_CORE/inherit' ); + const Node = require( 'SCENERY/nodes/Node' ); + const Path = require( 'SCENERY/nodes/Path' ); + const Property = require( 'AXON/Property' ); + const Shape = require( 'KITE/Shape' ); + const SimpleDragHandler = require( 'SCENERY/input/SimpleDragHandler' ); + const timer = require( 'AXON/timer' ); + const Util = require( 'DOT/Util' ); + const Vector2 = require( 'DOT/Vector2' ); // constants var MIN_EXPRESSION_IN_BOUNDS_WIDTH = 70; // in screen coords, min horizontal amount of expression that must stay in bounds diff --git a/js/common/view/LeftRightNumberSpinner.js b/js/common/view/LeftRightNumberSpinner.js index 99f7fe3a..9255fff4 100644 --- a/js/common/view/LeftRightNumberSpinner.js +++ b/js/common/view/LeftRightNumberSpinner.js @@ -6,21 +6,21 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var HBox = require( 'SCENERY/nodes/HBox' ); - var inherit = require( 'PHET_CORE/inherit' ); - var MathSymbolFont = require( 'SCENERY_PHET/MathSymbolFont' ); - var MathSymbols = require( 'SCENERY_PHET/MathSymbols' ); - var Node = require( 'SCENERY/nodes/Node' ); - var NumberSpinner = require( 'SUN/NumberSpinner' ); - var PhetFont = require( 'SCENERY_PHET/PhetFont' ); - var Property = require( 'AXON/Property' ); - var Range = require( 'DOT/Range' ); - var Text = require( 'SCENERY/nodes/Text' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const HBox = require( 'SCENERY/nodes/HBox' ); + const inherit = require( 'PHET_CORE/inherit' ); + const MathSymbolFont = require( 'SCENERY_PHET/MathSymbolFont' ); + const MathSymbols = require( 'SCENERY_PHET/MathSymbols' ); + const Node = require( 'SCENERY/nodes/Node' ); + const NumberSpinner = require( 'SUN/NumberSpinner' ); + const PhetFont = require( 'SCENERY_PHET/PhetFont' ); + const Property = require( 'AXON/Property' ); + const Range = require( 'DOT/Range' ); + const Text = require( 'SCENERY/nodes/Text' ); // constants var READOUT_FONT = new PhetFont( 16 ); diff --git a/js/common/view/ShowSubtractionIcon.js b/js/common/view/ShowSubtractionIcon.js index 989eaee5..99995f52 100644 --- a/js/common/view/ShowSubtractionIcon.js +++ b/js/common/view/ShowSubtractionIcon.js @@ -5,18 +5,18 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var ArrowNode = require( 'SCENERY_PHET/ArrowNode' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var inherit = require( 'PHET_CORE/inherit' ); - var MathSymbolFont = require( 'SCENERY_PHET/MathSymbolFont' ); - var MathSymbols = require( 'SCENERY_PHET/MathSymbols' ); - var Node = require( 'SCENERY/nodes/Node' ); - var Rectangle = require( 'SCENERY/nodes/Rectangle' ); - var Text = require( 'SCENERY/nodes/Text' ); + const ArrowNode = require( 'SCENERY_PHET/ArrowNode' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const inherit = require( 'PHET_CORE/inherit' ); + const MathSymbolFont = require( 'SCENERY_PHET/MathSymbolFont' ); + const MathSymbols = require( 'SCENERY_PHET/MathSymbols' ); + const Node = require( 'SCENERY/nodes/Node' ); + const Rectangle = require( 'SCENERY/nodes/Rectangle' ); + const Text = require( 'SCENERY/nodes/Text' ); // constants var MATH_FONT = new MathSymbolFont( { size: 21, weight: 'bold' } ); diff --git a/js/common/view/VariableCoinTermNode.js b/js/common/view/VariableCoinTermNode.js index 059ac6fb..5c01a6f1 100644 --- a/js/common/view/VariableCoinTermNode.js +++ b/js/common/view/VariableCoinTermNode.js @@ -5,26 +5,26 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var AbstractCoinTermNode = require( 'EXPRESSION_EXCHANGE/common/view/AbstractCoinTermNode' ); - var Animation = require( 'TWIXT/Animation' ); - var CoinNodeFactory = require( 'EXPRESSION_EXCHANGE/common/view/CoinNodeFactory' ); - var Easing = require( 'TWIXT/Easing' ); - var EEQueryParameters = require( 'EXPRESSION_EXCHANGE/common/EEQueryParameters' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var inherit = require( 'PHET_CORE/inherit' ); - var MathSymbolFont = require( 'SCENERY_PHET/MathSymbolFont' ); - var MathSymbols = require( 'SCENERY_PHET/MathSymbols' ); - var PhetFont = require( 'SCENERY_PHET/PhetFont' ); - var Property = require( 'AXON/Property' ); - var Rectangle = require( 'SCENERY/nodes/Rectangle' ); - var RichText = require( 'SCENERY/nodes/RichText' ); - var Text = require( 'SCENERY/nodes/Text' ); - var Vector2 = require( 'DOT/Vector2' ); - var ViewMode = require( 'EXPRESSION_EXCHANGE/common/enum/ViewMode' ); + const AbstractCoinTermNode = require( 'EXPRESSION_EXCHANGE/common/view/AbstractCoinTermNode' ); + const Animation = require( 'TWIXT/Animation' ); + const CoinNodeFactory = require( 'EXPRESSION_EXCHANGE/common/view/CoinNodeFactory' ); + const Easing = require( 'TWIXT/Easing' ); + const EEQueryParameters = require( 'EXPRESSION_EXCHANGE/common/EEQueryParameters' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const inherit = require( 'PHET_CORE/inherit' ); + const MathSymbolFont = require( 'SCENERY_PHET/MathSymbolFont' ); + const MathSymbols = require( 'SCENERY_PHET/MathSymbols' ); + const PhetFont = require( 'SCENERY_PHET/PhetFont' ); + const Property = require( 'AXON/Property' ); + const Rectangle = require( 'SCENERY/nodes/Rectangle' ); + const RichText = require( 'SCENERY/nodes/RichText' ); + const Text = require( 'SCENERY/nodes/Text' ); + const Vector2 = require( 'DOT/Vector2' ); + const ViewMode = require( 'EXPRESSION_EXCHANGE/common/enum/ViewMode' ); // constants var COEFFICIENT_FONT = new PhetFont( { size: 34 } ); diff --git a/js/common/view/VariableValueControl.js b/js/common/view/VariableValueControl.js index 53299a68..82a111b3 100644 --- a/js/common/view/VariableValueControl.js +++ b/js/common/view/VariableValueControl.js @@ -3,15 +3,15 @@ /** * a node that allows the user to change the values of the variables that underlie the various coin terms */ -define( function( require ) { +define( require => { 'use strict'; // modules - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var inherit = require( 'PHET_CORE/inherit' ); - var LeftRightNumberSpinner = require( 'EXPRESSION_EXCHANGE/common/view/LeftRightNumberSpinner' ); - var ResetButton = require( 'SCENERY_PHET/buttons/ResetButton' ); - var VBox = require( 'SCENERY/nodes/VBox' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const inherit = require( 'PHET_CORE/inherit' ); + const LeftRightNumberSpinner = require( 'EXPRESSION_EXCHANGE/common/view/LeftRightNumberSpinner' ); + const ResetButton = require( 'SCENERY_PHET/buttons/ResetButton' ); + const VBox = require( 'SCENERY/nodes/VBox' ); /** * @param {Object} [options] diff --git a/js/explore/EEExploreScreen.js b/js/explore/EEExploreScreen.js index 81a8189b..8cf3bf99 100644 --- a/js/explore/EEExploreScreen.js +++ b/js/explore/EEExploreScreen.js @@ -5,22 +5,22 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var CoinTermCreatorSetID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermCreatorSetID' ); - var EEExploreIconNode = require( 'EXPRESSION_EXCHANGE/explore/view/EEExploreIconNode' ); - var EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var ExpressionExplorationScreenView = require( 'EXPRESSION_EXCHANGE/common/view/ExpressionExplorationScreenView' ); - var ExpressionManipulationModel = require( 'EXPRESSION_EXCHANGE/common/model/ExpressionManipulationModel' ); - var inherit = require( 'PHET_CORE/inherit' ); - var Property = require( 'AXON/Property' ); - var Screen = require( 'JOIST/Screen' ); + const CoinTermCreatorSetID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermCreatorSetID' ); + const EEExploreIconNode = require( 'EXPRESSION_EXCHANGE/explore/view/EEExploreIconNode' ); + const EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const ExpressionExplorationScreenView = require( 'EXPRESSION_EXCHANGE/common/view/ExpressionExplorationScreenView' ); + const ExpressionManipulationModel = require( 'EXPRESSION_EXCHANGE/common/model/ExpressionManipulationModel' ); + const inherit = require( 'PHET_CORE/inherit' ); + const Property = require( 'AXON/Property' ); + const Screen = require( 'JOIST/Screen' ); // strings - var exploreString = require( 'string!EXPRESSION_EXCHANGE/explore' ); + const exploreString = require( 'string!EXPRESSION_EXCHANGE/explore' ); /** * @constructor diff --git a/js/explore/view/EEExploreIconNode.js b/js/explore/view/EEExploreIconNode.js index da602fca..58f5e445 100644 --- a/js/explore/view/EEExploreIconNode.js +++ b/js/explore/view/EEExploreIconNode.js @@ -5,20 +5,20 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var inherit = require( 'PHET_CORE/inherit' ); - var MathSymbolFont = require( 'SCENERY_PHET/MathSymbolFont' ); - var MathSymbols = require( 'SCENERY_PHET/MathSymbols' ); - var Node = require( 'SCENERY/nodes/Node' ); - var PhetFont = require( 'SCENERY_PHET/PhetFont' ); - var Rectangle = require( 'SCENERY/nodes/Rectangle' ); - var Screen = require( 'JOIST/Screen' ); - var Text = require( 'SCENERY/nodes/Text' ); + const EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const inherit = require( 'PHET_CORE/inherit' ); + const MathSymbolFont = require( 'SCENERY_PHET/MathSymbolFont' ); + const MathSymbols = require( 'SCENERY_PHET/MathSymbols' ); + const Node = require( 'SCENERY/nodes/Node' ); + const PhetFont = require( 'SCENERY_PHET/PhetFont' ); + const Rectangle = require( 'SCENERY/nodes/Rectangle' ); + const Screen = require( 'JOIST/Screen' ); + const Text = require( 'SCENERY/nodes/Text' ); // constants var ICON_SIZE = Screen.MINIMUM_HOME_SCREEN_ICON_SIZE; diff --git a/js/expression-exchange-main.js b/js/expression-exchange-main.js index 0e7d690a..839db415 100644 --- a/js/expression-exchange-main.js +++ b/js/expression-exchange-main.js @@ -5,19 +5,19 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var EEBasicsScreen = require( 'EXPRESSION_EXCHANGE/basics/EEBasicsScreen' ); - var EEExploreScreen = require( 'EXPRESSION_EXCHANGE/explore/EEExploreScreen' ); - var EEGameScreen = require( 'EXPRESSION_EXCHANGE/game/EEGameScreen' ); - var EENegativesScreen = require( 'EXPRESSION_EXCHANGE/negatives/EENegativesScreen' ); - var Sim = require( 'JOIST/Sim' ); - var SimLauncher = require( 'JOIST/SimLauncher' ); + const EEBasicsScreen = require( 'EXPRESSION_EXCHANGE/basics/EEBasicsScreen' ); + const EEExploreScreen = require( 'EXPRESSION_EXCHANGE/explore/EEExploreScreen' ); + const EEGameScreen = require( 'EXPRESSION_EXCHANGE/game/EEGameScreen' ); + const EENegativesScreen = require( 'EXPRESSION_EXCHANGE/negatives/EENegativesScreen' ); + const Sim = require( 'JOIST/Sim' ); + const SimLauncher = require( 'JOIST/SimLauncher' ); // strings - var expressionExchangeTitleString = require( 'string!EXPRESSION_EXCHANGE/expression-exchange.title' ); + const expressionExchangeTitleString = require( 'string!EXPRESSION_EXCHANGE/expression-exchange.title' ); // credits var simOptions = { diff --git a/js/expressionExchange.js b/js/expressionExchange.js index 00593283..6bb69bb4 100644 --- a/js/expressionExchange.js +++ b/js/expressionExchange.js @@ -5,11 +5,11 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var Namespace = require( 'PHET_CORE/Namespace' ); + const Namespace = require( 'PHET_CORE/Namespace' ); return new Namespace( 'expressionExchange' ); } ); \ No newline at end of file diff --git a/js/game/EEGameScreen.js b/js/game/EEGameScreen.js index 0a712fcd..8e21ec86 100644 --- a/js/game/EEGameScreen.js +++ b/js/game/EEGameScreen.js @@ -5,21 +5,21 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var EEGameIconNode = require( 'EXPRESSION_EXCHANGE/game/view/EEGameIconNode' ); - var EEGameModel = require( 'EXPRESSION_EXCHANGE/game/model/EEGameModel' ); - var EEGameScreenView = require( 'EXPRESSION_EXCHANGE/game/view/EEGameScreenView' ); - var EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var inherit = require( 'PHET_CORE/inherit' ); - var Property = require( 'AXON/Property' ); - var Screen = require( 'JOIST/Screen' ); + const EEGameIconNode = require( 'EXPRESSION_EXCHANGE/game/view/EEGameIconNode' ); + const EEGameModel = require( 'EXPRESSION_EXCHANGE/game/model/EEGameModel' ); + const EEGameScreenView = require( 'EXPRESSION_EXCHANGE/game/view/EEGameScreenView' ); + const EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const inherit = require( 'PHET_CORE/inherit' ); + const Property = require( 'AXON/Property' ); + const Screen = require( 'JOIST/Screen' ); // strings - var gameString = require( 'string!EXPRESSION_EXCHANGE/game' ); + const gameString = require( 'string!EXPRESSION_EXCHANGE/game' ); /** * @constructor diff --git a/js/game/model/EEChallengeDescriptors.js b/js/game/model/EEChallengeDescriptors.js index f1aac5e3..c9c8eb31 100644 --- a/js/game/model/EEChallengeDescriptors.js +++ b/js/game/model/EEChallengeDescriptors.js @@ -5,13 +5,13 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var CoinTermTypeID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermTypeID' ); - var ExpressionDescription = require( 'EXPRESSION_EXCHANGE/game/model/ExpressionDescription' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const CoinTermTypeID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermTypeID' ); + const ExpressionDescription = require( 'EXPRESSION_EXCHANGE/game/model/ExpressionDescription' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); // The challenge set, organized as a 2D array where the first dimension is level, the second is challenge number. // The challenge descriptions are organized as a set of expressions that the user should construct and collect and diff --git a/js/game/model/EECollectionArea.js b/js/game/model/EECollectionArea.js index 12fc1e23..1752515c 100644 --- a/js/game/model/EECollectionArea.js +++ b/js/game/model/EECollectionArea.js @@ -4,18 +4,18 @@ * model element used in the game that represents the area where an expression or coin term can be collected if it * matches the collection specification */ -define( function( require ) { +define( require => { 'use strict'; // modules - var CoinTerm = require( 'EXPRESSION_EXCHANGE/common/model/CoinTerm' ); - var EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); - var Emitter = require( 'AXON/Emitter' ); - var Expression = require( 'EXPRESSION_EXCHANGE/common/model/Expression' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var inherit = require( 'PHET_CORE/inherit' ); - var Property = require( 'AXON/Property' ); - var Vector2 = require( 'DOT/Vector2' ); + const CoinTerm = require( 'EXPRESSION_EXCHANGE/common/model/CoinTerm' ); + const EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); + const Emitter = require( 'AXON/Emitter' ); + const Expression = require( 'EXPRESSION_EXCHANGE/common/model/Expression' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const inherit = require( 'PHET_CORE/inherit' ); + const Property = require( 'AXON/Property' ); + const Vector2 = require( 'DOT/Vector2' ); // constants var REJECTED_ITEM_DISTANCE = 20; // empirically determined diff --git a/js/game/model/EEGameLevel.js b/js/game/model/EEGameLevel.js index da90c79a..a70ef6bc 100644 --- a/js/game/model/EEGameLevel.js +++ b/js/game/model/EEGameLevel.js @@ -5,19 +5,19 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var AllowedRepresentations = require( 'EXPRESSION_EXCHANGE/common/enum/AllowedRepresentations' ); - var DerivedProperty = require( 'AXON/DerivedProperty' ); - var EEChallengeDescriptors = require( 'EXPRESSION_EXCHANGE/game/model/EEChallengeDescriptors' ); - var EECollectionArea = require( 'EXPRESSION_EXCHANGE/game/model/EECollectionArea' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var ExpressionManipulationModel = require( 'EXPRESSION_EXCHANGE/common/model/ExpressionManipulationModel' ); - var inherit = require( 'PHET_CORE/inherit' ); - var Property = require( 'AXON/Property' ); - var ViewMode = require( 'EXPRESSION_EXCHANGE/common/enum/ViewMode' ); + const AllowedRepresentations = require( 'EXPRESSION_EXCHANGE/common/enum/AllowedRepresentations' ); + const DerivedProperty = require( 'AXON/DerivedProperty' ); + const EEChallengeDescriptors = require( 'EXPRESSION_EXCHANGE/game/model/EEChallengeDescriptors' ); + const EECollectionArea = require( 'EXPRESSION_EXCHANGE/game/model/EECollectionArea' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const ExpressionManipulationModel = require( 'EXPRESSION_EXCHANGE/common/model/ExpressionManipulationModel' ); + const inherit = require( 'PHET_CORE/inherit' ); + const Property = require( 'AXON/Property' ); + const ViewMode = require( 'EXPRESSION_EXCHANGE/common/enum/ViewMode' ); // constants var EXPRESSION_COLLECTION_AREA_X_OFFSET = 750; diff --git a/js/game/model/EEGameModel.js b/js/game/model/EEGameModel.js index db66668d..2aafd853 100644 --- a/js/game/model/EEGameModel.js +++ b/js/game/model/EEGameModel.js @@ -5,17 +5,17 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var AllowedRepresentations = require( 'EXPRESSION_EXCHANGE/common/enum/AllowedRepresentations' ); - var EEChallengeDescriptors = require( 'EXPRESSION_EXCHANGE/game/model/EEChallengeDescriptors' ); - var EEGameLevel = require( 'EXPRESSION_EXCHANGE/game/model/EEGameLevel' ); - var EEQueryParameters = require( 'EXPRESSION_EXCHANGE/common/EEQueryParameters' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var inherit = require( 'PHET_CORE/inherit' ); - var Property = require( 'AXON/Property' ); + const AllowedRepresentations = require( 'EXPRESSION_EXCHANGE/common/enum/AllowedRepresentations' ); + const EEChallengeDescriptors = require( 'EXPRESSION_EXCHANGE/game/model/EEChallengeDescriptors' ); + const EEGameLevel = require( 'EXPRESSION_EXCHANGE/game/model/EEGameLevel' ); + const EEQueryParameters = require( 'EXPRESSION_EXCHANGE/common/EEQueryParameters' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const inherit = require( 'PHET_CORE/inherit' ); + const Property = require( 'AXON/Property' ); // constants var NUMBER_OF_LEVELS = EEQueryParameters.minimalGameLevels ? 2 : 8; diff --git a/js/game/model/ExpressionDescription.js b/js/game/model/ExpressionDescription.js index 86eec6bb..e7f2dd54 100644 --- a/js/game/model/ExpressionDescription.js +++ b/js/game/model/ExpressionDescription.js @@ -7,14 +7,14 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var CoinTermTypeID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermTypeID' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var inherit = require( 'PHET_CORE/inherit' ); - var Term = require( 'EXPRESSION_EXCHANGE/game/model/Term' ); + const CoinTermTypeID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermTypeID' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const inherit = require( 'PHET_CORE/inherit' ); + const Term = require( 'EXPRESSION_EXCHANGE/game/model/Term' ); /** * @param {string} expressionString diff --git a/js/game/model/Term.js b/js/game/model/Term.js index ef912a47..71fe11b1 100644 --- a/js/game/model/Term.js +++ b/js/game/model/Term.js @@ -5,13 +5,13 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var CoinTermTypeID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermTypeID' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var inherit = require( 'PHET_CORE/inherit' ); + const CoinTermTypeID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermTypeID' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const inherit = require( 'PHET_CORE/inherit' ); /** * @param {number} coefficient diff --git a/js/game/view/EECollectionAreaNode.js b/js/game/view/EECollectionAreaNode.js index f734c3a9..123718cb 100644 --- a/js/game/view/EECollectionAreaNode.js +++ b/js/game/view/EECollectionAreaNode.js @@ -3,15 +3,15 @@ /** * view representation of the area where expressions can be collected, used in the game */ -define( function( require ) { +define( require => { 'use strict'; // modules - var ExpressionDescriptionNode = require( 'EXPRESSION_EXCHANGE/game/view/ExpressionDescriptionNode' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var inherit = require( 'PHET_CORE/inherit' ); - var Node = require( 'SCENERY/nodes/Node' ); - var Rectangle = require( 'SCENERY/nodes/Rectangle' ); + const ExpressionDescriptionNode = require( 'EXPRESSION_EXCHANGE/game/view/ExpressionDescriptionNode' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const inherit = require( 'PHET_CORE/inherit' ); + const Node = require( 'SCENERY/nodes/Node' ); + const Rectangle = require( 'SCENERY/nodes/Rectangle' ); // constants var CORNER_RADIUS = 4; diff --git a/js/game/view/EEGameIconNode.js b/js/game/view/EEGameIconNode.js index f37830b5..8ef880fd 100644 --- a/js/game/view/EEGameIconNode.js +++ b/js/game/view/EEGameIconNode.js @@ -5,23 +5,23 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var CoinNodeFactory = require( 'EXPRESSION_EXCHANGE/common/view/CoinNodeFactory' ); - var CoinTermTypeID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermTypeID' ); - var EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var FaceNode = require( 'SCENERY_PHET/FaceNode' ); - var HBox = require( 'SCENERY/nodes/HBox' ); - var HStrut = require( 'SCENERY/nodes/HStrut' ); - var inherit = require( 'PHET_CORE/inherit' ); - var MathSymbols = require( 'SCENERY_PHET/MathSymbols' ); - var PhetFont = require( 'SCENERY_PHET/PhetFont' ); - var Rectangle = require( 'SCENERY/nodes/Rectangle' ); - var Screen = require( 'JOIST/Screen' ); - var Text = require( 'SCENERY/nodes/Text' ); + const CoinNodeFactory = require( 'EXPRESSION_EXCHANGE/common/view/CoinNodeFactory' ); + const CoinTermTypeID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermTypeID' ); + const EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const FaceNode = require( 'SCENERY_PHET/FaceNode' ); + const HBox = require( 'SCENERY/nodes/HBox' ); + const HStrut = require( 'SCENERY/nodes/HStrut' ); + const inherit = require( 'PHET_CORE/inherit' ); + const MathSymbols = require( 'SCENERY_PHET/MathSymbols' ); + const PhetFont = require( 'SCENERY_PHET/PhetFont' ); + const Rectangle = require( 'SCENERY/nodes/Rectangle' ); + const Screen = require( 'JOIST/Screen' ); + const Text = require( 'SCENERY/nodes/Text' ); // constants var BACKGROUND_COLOR = EESharedConstants.GAME_SCREEN_BACKGROUND_COLOR; diff --git a/js/game/view/EEGameLevelIconFactory.js b/js/game/view/EEGameLevelIconFactory.js index ae525389..158c94d1 100644 --- a/js/game/view/EEGameLevelIconFactory.js +++ b/js/game/view/EEGameLevelIconFactory.js @@ -4,18 +4,18 @@ * static object that provides functions for creating nodes that represent the coins used in the simulation * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var CoinNodeFactory = require( 'EXPRESSION_EXCHANGE/common/view/CoinNodeFactory' ); - var CoinTermTypeID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermTypeID' ); - var EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var Node = require( 'SCENERY/nodes/Node' ); - var PhetFont = require( 'SCENERY_PHET/PhetFont' ); - var Rectangle = require( 'SCENERY/nodes/Rectangle' ); - var Text = require( 'SCENERY/nodes/Text' ); + const CoinNodeFactory = require( 'EXPRESSION_EXCHANGE/common/view/CoinNodeFactory' ); + const CoinTermTypeID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermTypeID' ); + const EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const Node = require( 'SCENERY/nodes/Node' ); + const PhetFont = require( 'SCENERY_PHET/PhetFont' ); + const Rectangle = require( 'SCENERY/nodes/Rectangle' ); + const Text = require( 'SCENERY/nodes/Text' ); // constants var CARD_CORNER_ROUNDING = 4; diff --git a/js/game/view/EEGameLevelView.js b/js/game/view/EEGameLevelView.js index dde6d484..a2cd2bcc 100644 --- a/js/game/view/EEGameLevelView.js +++ b/js/game/view/EEGameLevelView.js @@ -5,32 +5,32 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var AllLevelsCompletedNode = require( 'VEGAS/AllLevelsCompletedNode' ); - var BackButton = require( 'SCENERY_PHET/buttons/BackButton' ); - var Checkbox = require( 'SUN/Checkbox' ); - var CoinTermCreatorBoxFactory = require( 'EXPRESSION_EXCHANGE/common/view/CoinTermCreatorBoxFactory' ); - var EEQueryParameters = require( 'EXPRESSION_EXCHANGE/common/EEQueryParameters' ); - var EERewardNode = require( 'EXPRESSION_EXCHANGE/game/view/EERewardNode' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var ExpressionManipulationView = require( 'EXPRESSION_EXCHANGE/common/view/ExpressionManipulationView' ); - var inherit = require( 'PHET_CORE/inherit' ); - var NextLevelNode = require( 'EXPRESSION_EXCHANGE/game/view/NextLevelNode' ); - var Node = require( 'SCENERY/nodes/Node' ); - var PhetFont = require( 'SCENERY_PHET/PhetFont' ); - var platform = require( 'PHET_CORE/platform' ); - var Property = require( 'AXON/Property' ); - var Rectangle = require( 'SCENERY/nodes/Rectangle' ); - var RefreshButton = require( 'SCENERY_PHET/buttons/RefreshButton' ); - var ShowSubtractionIcon = require( 'EXPRESSION_EXCHANGE/common/view/ShowSubtractionIcon' ); - var StringUtils = require( 'PHETCOMMON/util/StringUtils' ); - var Text = require( 'SCENERY/nodes/Text' ); + const AllLevelsCompletedNode = require( 'VEGAS/AllLevelsCompletedNode' ); + const BackButton = require( 'SCENERY_PHET/buttons/BackButton' ); + const Checkbox = require( 'SUN/Checkbox' ); + const CoinTermCreatorBoxFactory = require( 'EXPRESSION_EXCHANGE/common/view/CoinTermCreatorBoxFactory' ); + const EEQueryParameters = require( 'EXPRESSION_EXCHANGE/common/EEQueryParameters' ); + const EERewardNode = require( 'EXPRESSION_EXCHANGE/game/view/EERewardNode' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const ExpressionManipulationView = require( 'EXPRESSION_EXCHANGE/common/view/ExpressionManipulationView' ); + const inherit = require( 'PHET_CORE/inherit' ); + const NextLevelNode = require( 'EXPRESSION_EXCHANGE/game/view/NextLevelNode' ); + const Node = require( 'SCENERY/nodes/Node' ); + const PhetFont = require( 'SCENERY_PHET/PhetFont' ); + const platform = require( 'PHET_CORE/platform' ); + const Property = require( 'AXON/Property' ); + const Rectangle = require( 'SCENERY/nodes/Rectangle' ); + const RefreshButton = require( 'SCENERY_PHET/buttons/RefreshButton' ); + const ShowSubtractionIcon = require( 'EXPRESSION_EXCHANGE/common/view/ShowSubtractionIcon' ); + const StringUtils = require( 'PHETCOMMON/util/StringUtils' ); + const Text = require( 'SCENERY/nodes/Text' ); // strings - var levelNumberPatternString = require( 'string!EXPRESSION_EXCHANGE/levelNumberPattern' ); + const levelNumberPatternString = require( 'string!EXPRESSION_EXCHANGE/levelNumberPattern' ); // constants var BUTTON_XY_TOUCH_DILATION = 4; diff --git a/js/game/view/EEGameScreenView.js b/js/game/view/EEGameScreenView.js index d06afafd..8eedc9d3 100644 --- a/js/game/view/EEGameScreenView.js +++ b/js/game/view/EEGameScreenView.js @@ -5,21 +5,21 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var Animation = require( 'TWIXT/Animation' ); - var Easing = require( 'TWIXT/Easing' ); - var EEGameLevelIconFactory = require( 'EXPRESSION_EXCHANGE/game/view/EEGameLevelIconFactory' ); - var EEGameLevelView = require( 'EXPRESSION_EXCHANGE/game/view/EEGameLevelView' ); - var EEGameModel = require( 'EXPRESSION_EXCHANGE/game/model/EEGameModel' ); - var EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var GameAudioPlayer = require( 'VEGAS/GameAudioPlayer' ); - var inherit = require( 'PHET_CORE/inherit' ); - var LevelSelectionNode = require( 'EXPRESSION_EXCHANGE/game/view/LevelSelectionNode' ); - var ScreenView = require( 'JOIST/ScreenView' ); + const Animation = require( 'TWIXT/Animation' ); + const Easing = require( 'TWIXT/Easing' ); + const EEGameLevelIconFactory = require( 'EXPRESSION_EXCHANGE/game/view/EEGameLevelIconFactory' ); + const EEGameLevelView = require( 'EXPRESSION_EXCHANGE/game/view/EEGameLevelView' ); + const EEGameModel = require( 'EXPRESSION_EXCHANGE/game/model/EEGameModel' ); + const EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const GameAudioPlayer = require( 'VEGAS/GameAudioPlayer' ); + const inherit = require( 'PHET_CORE/inherit' ); + const LevelSelectionNode = require( 'EXPRESSION_EXCHANGE/game/view/LevelSelectionNode' ); + const ScreenView = require( 'JOIST/ScreenView' ); // constants var SCREEN_CHANGE_TIME = 1; // seconds diff --git a/js/game/view/EERewardNode.js b/js/game/view/EERewardNode.js index def33bb7..3dce2679 100644 --- a/js/game/view/EERewardNode.js +++ b/js/game/view/EERewardNode.js @@ -5,19 +5,19 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var CoinNodeFactory = require( 'EXPRESSION_EXCHANGE/common/view/CoinNodeFactory' ); - var CoinTermTypeID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermTypeID' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var FaceNode = require( 'SCENERY_PHET/FaceNode' ); - var inherit = require( 'PHET_CORE/inherit' ); - var MathSymbolFont = require( 'SCENERY_PHET/MathSymbolFont' ); - var RewardNode = require( 'VEGAS/RewardNode' ); - var StarNode = require( 'SCENERY_PHET/StarNode' ); - var Text = require( 'SCENERY/nodes/Text' ); + const CoinNodeFactory = require( 'EXPRESSION_EXCHANGE/common/view/CoinNodeFactory' ); + const CoinTermTypeID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermTypeID' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const FaceNode = require( 'SCENERY_PHET/FaceNode' ); + const inherit = require( 'PHET_CORE/inherit' ); + const MathSymbolFont = require( 'SCENERY_PHET/MathSymbolFont' ); + const RewardNode = require( 'VEGAS/RewardNode' ); + const StarNode = require( 'SCENERY_PHET/StarNode' ); + const Text = require( 'SCENERY/nodes/Text' ); // constants var NUMBER_OF_NODES = 60; diff --git a/js/game/view/ExpressionDescriptionNode.js b/js/game/view/ExpressionDescriptionNode.js index 6a7c7eab..494ced0b 100644 --- a/js/game/view/ExpressionDescriptionNode.js +++ b/js/game/view/ExpressionDescriptionNode.js @@ -7,20 +7,20 @@ * Note the expression description string is re-parsed in this object because the expression description is in the * reduced form (no parens) and we need to handle subscripts and superscripts. */ -define( function( require ) { +define( require => { 'use strict'; // modules - var CoinNodeFactory = require( 'EXPRESSION_EXCHANGE/common/view/CoinNodeFactory' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var HBox = require( 'SCENERY/nodes/HBox' ); - var inherit = require( 'PHET_CORE/inherit' ); - var MathSymbolFont = require( 'SCENERY_PHET/MathSymbolFont' ); - var MathSymbols = require( 'SCENERY_PHET/MathSymbols' ); - var PhetFont = require( 'SCENERY_PHET/PhetFont' ); - var RichText = require( 'SCENERY/nodes/RichText' ); - var Text = require( 'SCENERY/nodes/Text' ); - var ViewMode = require( 'EXPRESSION_EXCHANGE/common/enum/ViewMode' ); + const CoinNodeFactory = require( 'EXPRESSION_EXCHANGE/common/view/CoinNodeFactory' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const HBox = require( 'SCENERY/nodes/HBox' ); + const inherit = require( 'PHET_CORE/inherit' ); + const MathSymbolFont = require( 'SCENERY_PHET/MathSymbolFont' ); + const MathSymbols = require( 'SCENERY_PHET/MathSymbols' ); + const PhetFont = require( 'SCENERY_PHET/PhetFont' ); + const RichText = require( 'SCENERY/nodes/RichText' ); + const Text = require( 'SCENERY/nodes/Text' ); + const ViewMode = require( 'EXPRESSION_EXCHANGE/common/enum/ViewMode' ); // constants var COIN_ICON_RADIUS = 10; diff --git a/js/game/view/LevelSelectionNode.js b/js/game/view/LevelSelectionNode.js index 738b6673..c852b1c2 100644 --- a/js/game/view/LevelSelectionNode.js +++ b/js/game/view/LevelSelectionNode.js @@ -5,24 +5,24 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var EEGameModel = require( 'EXPRESSION_EXCHANGE/game/model/EEGameModel' ); - var EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var inherit = require( 'PHET_CORE/inherit' ); - var LevelSelectionButton = require( 'VEGAS/LevelSelectionButton' ); - var Node = require( 'SCENERY/nodes/Node' ); - var PhetFont = require( 'SCENERY_PHET/PhetFont' ); - var Property = require( 'AXON/Property' ); - var ResetAllButton = require( 'SCENERY_PHET/buttons/ResetAllButton' ); - var Text = require( 'SCENERY/nodes/Text' ); - var Vector2 = require( 'DOT/Vector2' ); + const EEGameModel = require( 'EXPRESSION_EXCHANGE/game/model/EEGameModel' ); + const EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const inherit = require( 'PHET_CORE/inherit' ); + const LevelSelectionButton = require( 'VEGAS/LevelSelectionButton' ); + const Node = require( 'SCENERY/nodes/Node' ); + const PhetFont = require( 'SCENERY_PHET/PhetFont' ); + const Property = require( 'AXON/Property' ); + const ResetAllButton = require( 'SCENERY_PHET/buttons/ResetAllButton' ); + const Text = require( 'SCENERY/nodes/Text' ); + const Vector2 = require( 'DOT/Vector2' ); // strings - var chooseYourLevelString = require( 'string!VEGAS/chooseYourLevel' ); + const chooseYourLevelString = require( 'string!VEGAS/chooseYourLevel' ); /** * @param {Function} startLevelFunction - Function used to initiate a game level, will be called with a zero-based diff --git a/js/game/view/NextLevelNode.js b/js/game/view/NextLevelNode.js index ada5de9d..8ac8396e 100644 --- a/js/game/view/NextLevelNode.js +++ b/js/game/view/NextLevelNode.js @@ -1,22 +1,22 @@ // Copyright 2017, University of Colorado Boulder -define( function( require ) { +define( require => { 'use strict'; // modules - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var FaceNode = require( 'SCENERY_PHET/FaceNode' ); - var inherit = require( 'PHET_CORE/inherit' ); - var Node = require( 'SCENERY/nodes/Node' ); - var PhetFont = require( 'SCENERY_PHET/PhetFont' ); - var RectangularPushButton = require( 'SUN/buttons/RectangularPushButton' ); - var Text = require( 'SCENERY/nodes/Text' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const FaceNode = require( 'SCENERY_PHET/FaceNode' ); + const inherit = require( 'PHET_CORE/inherit' ); + const Node = require( 'SCENERY/nodes/Node' ); + const PhetFont = require( 'SCENERY_PHET/PhetFont' ); + const RectangularPushButton = require( 'SUN/buttons/RectangularPushButton' ); + const Text = require( 'SCENERY/nodes/Text' ); // constants var FACE_DIAMETER = 150; // empirically determined // strings - var nextString = require( 'string!EXPRESSION_EXCHANGE/next' ); + const nextString = require( 'string!EXPRESSION_EXCHANGE/next' ); /** * @param {Function} listener - function that gets called when 'next' button is pressed diff --git a/js/game/view/UndoButton.js b/js/game/view/UndoButton.js index a45bad1c..5a66e3e8 100644 --- a/js/game/view/UndoButton.js +++ b/js/game/view/UndoButton.js @@ -5,16 +5,16 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var Color = require( 'SCENERY/util/Color' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var inherit = require( 'PHET_CORE/inherit' ); - var Path = require( 'SCENERY/nodes/Path' ); - var RectangularPushButton = require( 'SUN/buttons/RectangularPushButton' ); - var Shape = require( 'KITE/Shape' ); + const Color = require( 'SCENERY/util/Color' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const inherit = require( 'PHET_CORE/inherit' ); + const Path = require( 'SCENERY/nodes/Path' ); + const RectangularPushButton = require( 'SUN/buttons/RectangularPushButton' ); + const Shape = require( 'KITE/Shape' ); // constants var MARGIN = 5; diff --git a/js/negatives/EENegativesScreen.js b/js/negatives/EENegativesScreen.js index c08a7b08..5f86dfb3 100644 --- a/js/negatives/EENegativesScreen.js +++ b/js/negatives/EENegativesScreen.js @@ -5,23 +5,23 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var AllowedRepresentations = require( 'EXPRESSION_EXCHANGE/common/enum/AllowedRepresentations' ); - var CoinTermCreatorSetID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermCreatorSetID' ); - var EENegativesIconNode = require( 'EXPRESSION_EXCHANGE/negatives/view/EENegativesIconNode' ); - var EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var ExpressionExplorationScreenView = require( 'EXPRESSION_EXCHANGE/common/view/ExpressionExplorationScreenView' ); - var ExpressionManipulationModel = require( 'EXPRESSION_EXCHANGE/common/model/ExpressionManipulationModel' ); - var inherit = require( 'PHET_CORE/inherit' ); - var Property = require( 'AXON/Property' ); - var Screen = require( 'JOIST/Screen' ); + const AllowedRepresentations = require( 'EXPRESSION_EXCHANGE/common/enum/AllowedRepresentations' ); + const CoinTermCreatorSetID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermCreatorSetID' ); + const EENegativesIconNode = require( 'EXPRESSION_EXCHANGE/negatives/view/EENegativesIconNode' ); + const EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const ExpressionExplorationScreenView = require( 'EXPRESSION_EXCHANGE/common/view/ExpressionExplorationScreenView' ); + const ExpressionManipulationModel = require( 'EXPRESSION_EXCHANGE/common/model/ExpressionManipulationModel' ); + const inherit = require( 'PHET_CORE/inherit' ); + const Property = require( 'AXON/Property' ); + const Screen = require( 'JOIST/Screen' ); // strings - var negativesString = require( 'string!EXPRESSION_EXCHANGE/negatives' ); + const negativesString = require( 'string!EXPRESSION_EXCHANGE/negatives' ); /** * @constructor diff --git a/js/negatives/model/EENegativesModel.js b/js/negatives/model/EENegativesModel.js index 18b11085..f5b61eef 100644 --- a/js/negatives/model/EENegativesModel.js +++ b/js/negatives/model/EENegativesModel.js @@ -5,15 +5,15 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var AllowedRepresentations = require( 'EXPRESSION_EXCHANGE/common/enum/AllowedRepresentations' ); - var CoinTermCreatorSetID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermCreatorSetID' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var ExpressionManipulationModel = require( 'EXPRESSION_EXCHANGE/common/model/ExpressionManipulationModel' ); - var inherit = require( 'PHET_CORE/inherit' ); + const AllowedRepresentations = require( 'EXPRESSION_EXCHANGE/common/enum/AllowedRepresentations' ); + const CoinTermCreatorSetID = require( 'EXPRESSION_EXCHANGE/common/enum/CoinTermCreatorSetID' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const ExpressionManipulationModel = require( 'EXPRESSION_EXCHANGE/common/model/ExpressionManipulationModel' ); + const inherit = require( 'PHET_CORE/inherit' ); /** * @constructor diff --git a/js/negatives/view/EENegativesIconNode.js b/js/negatives/view/EENegativesIconNode.js index c6b38581..9b930bc8 100644 --- a/js/negatives/view/EENegativesIconNode.js +++ b/js/negatives/view/EENegativesIconNode.js @@ -5,21 +5,21 @@ * * @author John Blanco */ -define( function( require ) { +define( require => { 'use strict'; // modules - var EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); - var expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); - var HBox = require( 'SCENERY/nodes/HBox' ); - var inherit = require( 'PHET_CORE/inherit' ); - var MathSymbolFont = require( 'SCENERY_PHET/MathSymbolFont' ); - var MathSymbols = require( 'SCENERY_PHET/MathSymbols' ); - var PhetFont = require( 'SCENERY_PHET/PhetFont' ); - var Rectangle = require( 'SCENERY/nodes/Rectangle' ); - var RichText = require( 'SCENERY/nodes/RichText' ); - var Screen = require( 'JOIST/Screen' ); - var Text = require( 'SCENERY/nodes/Text' ); + const EESharedConstants = require( 'EXPRESSION_EXCHANGE/common/EESharedConstants' ); + const expressionExchange = require( 'EXPRESSION_EXCHANGE/expressionExchange' ); + const HBox = require( 'SCENERY/nodes/HBox' ); + const inherit = require( 'PHET_CORE/inherit' ); + const MathSymbolFont = require( 'SCENERY_PHET/MathSymbolFont' ); + const MathSymbols = require( 'SCENERY_PHET/MathSymbols' ); + const PhetFont = require( 'SCENERY_PHET/PhetFont' ); + const Rectangle = require( 'SCENERY/nodes/Rectangle' ); + const RichText = require( 'SCENERY/nodes/RichText' ); + const Screen = require( 'JOIST/Screen' ); + const Text = require( 'SCENERY/nodes/Text' ); // constants var ICON_SIZE = Screen.MINIMUM_HOME_SCREEN_ICON_SIZE;