File tree Expand file tree Collapse file tree 7 files changed +8
-8
lines changed Expand file tree Collapse file tree 7 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ function setup() {
2525}
2626
2727let firstTime = true ;
28- function handleReset ( tRexes ) {
28+ function handleReset ( { tRexes } ) {
2929 if ( firstTime ) {
3030 // Initialize all the tRexes for the very first time.
3131 firstTime = false ;
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ function setup() {
2828}
2929
3030let firstTime = true ;
31- function handleReset ( tRexes ) {
31+ function handleReset ( { tRexes } ) {
3232 if ( firstTime ) {
3333 // Initialize all the tRexes with random models
3434 // for the very first time.
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ function setup() {
2121}
2222
2323let firstTime = true ;
24- function handleReset ( tRexes ) {
24+ function handleReset ( { tRexes } ) {
2525 const tRex = tRexes [ 0 ] ;
2626 if ( firstTime ) {
2727 firstTime = false ;
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ function setup() {
2121}
2222
2323let firstTime = true ;
24- function handleReset ( tRexes ) {
24+ function handleReset ( { tRexes } ) {
2525 if ( firstTime ) {
2626 // Initialize all the tRexes for the very first time.
2727 firstTime = false ;
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ function setup() {
2121}
2222
2323let firstTime = true ;
24- function handleReset ( tRexes ) {
24+ function handleReset ( { tRexes } ) {
2525 if ( firstTime ) {
2626 firstTime = false ;
2727 tRexes . forEach ( ( tRex ) => {
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ function setup() {
1818 runner . init ( ) ;
1919}
2020
21- function handleReset ( tRexes ) {
21+ function handleReset ( { tRexes } ) {
2222 // Add initialization of tRexes here.
2323 // This method is called everytime the game restarts.
2424}
Original file line number Diff line number Diff line change @@ -447,12 +447,12 @@ export default class Runner {
447447 this . distanceMeter . reset ( this . highestScore ) ;
448448 this . horizon . reset ( ) ;
449449 this . tRexGroup . reset ( ) ;
450- this . config . onReset ( this . tRexGroup . tRexes ) ;
450+ this . config . onReset ( { tRexes : this . tRexGroup . tRexes } ) ;
451451 this . update ( ) ;
452452 } else {
453453 this . isFirstTime = true ;
454454 this . tRexGroup . reset ( ) ;
455- this . config . onReset ( this . tRexGroup . tRexes ) ;
455+ this . config . onReset ( { tRexes : this . tRexGroup . tRexes } ) ;
456456 if ( ! this . playing ) {
457457 this . playing = true ;
458458 this . update ( ) ;
You can’t perform that action at this time.
0 commit comments