Skip to content

Commit

Permalink
rename MAX_NUMBER_BALLS to MAX_BALLS, to match query param, #72
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Aug 30, 2016
1 parent 7c8be1f commit 8c43057
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/lab/model/LabModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ define( function( require ) {
var PlinkoProbabilityQueryParameters = require( 'PLINKO_PROBABILITY/common/PlinkoProbabilityQueryParameters' );

// constants
var MAX_NUMBER_BALLS = PlinkoProbabilityQueryParameters.MAX_BALLS || 9999; // max number of balls per bin
var MAX_BALLS = PlinkoProbabilityQueryParameters.MAX_BALLS || 9999; // max number of balls *per bin*

/**
* @constructor
Expand Down Expand Up @@ -114,7 +114,7 @@ define( function( require ) {
var addedBall = new LabBall( this.probability, this.numberOfRows, this.histogram.bins );
this.histogram.bins[ addedBall.binIndex ].binCount++; //update the bin count of the bins
this.balls.push( addedBall ); // add the ball to the observable array
if ( thisModel.histogram.getMaximumActualBinCount() >= MAX_NUMBER_BALLS ) {
if ( thisModel.histogram.getMaximumActualBinCount() >= MAX_BALLS ) {
thisModel.isBallCapReached = true;
}
// ballOutOfPegsEmitter is emitted when the addedBall leaves the last peg on the Galton board.
Expand Down

0 comments on commit 8c43057

Please sign in to comment.