File tree Expand file tree Collapse file tree 6 files changed +12
-12
lines changed Expand file tree Collapse file tree 6 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ function setup() {
1414 // Initialize the game Runner.
1515 runner = new Runner ( '.game' , {
1616 T_REX_COUNT : 4 ,
17- onReset : handleRestart ,
17+ onReset : handleReset ,
1818 onCrash : handleCrash ,
1919 onRunning : handleRunning
2020 } ) ;
@@ -25,7 +25,7 @@ function setup() {
2525}
2626
2727let firstTime = true ;
28- function handleRestart ( 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 @@ -17,7 +17,7 @@ function setup() {
1717 // Initialize the game Runner.
1818 runner = new Runner ( '.game' , {
1919 T_REX_COUNT : 10 ,
20- onReset : handleRestart ,
20+ onReset : handleReset ,
2121 onCrash : handleCrash ,
2222 onRunning : handleRunning
2323 } ) ;
@@ -28,7 +28,7 @@ function setup() {
2828}
2929
3030let firstTime = true ;
31- function handleRestart ( 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 @@ -10,7 +10,7 @@ function setup() {
1010 // Initialize the game Runner.
1111 runner = new Runner ( '.game' , {
1212 T_REX_COUNT : 1 ,
13- onReset : handleRestart ,
13+ onReset : handleReset ,
1414 onCrash : handleCrash ,
1515 onRunning : handleRunning
1616 } ) ;
@@ -21,7 +21,7 @@ function setup() {
2121}
2222
2323let firstTime = true ;
24- function handleRestart ( 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 @@ -10,7 +10,7 @@ function setup() {
1010 // Initialize the game Runner.
1111 runner = new Runner ( '.game' , {
1212 T_REX_COUNT : 3 ,
13- onReset : handleRestart ,
13+ onReset : handleReset ,
1414 onCrash : handleCrash ,
1515 onRunning : handleRunning
1616 } ) ;
@@ -21,7 +21,7 @@ function setup() {
2121}
2222
2323let firstTime = true ;
24- function handleRestart ( 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 @@ -10,7 +10,7 @@ function setup() {
1010 // Initialize the game Runner.
1111 runner = new Runner ( '.game' , {
1212 T_REX_COUNT : 10 ,
13- onReset : handleRestart ,
13+ onReset : handleReset ,
1414 onCrash : handleCrash ,
1515 onRunning : handleRunning
1616 } ) ;
@@ -21,7 +21,7 @@ function setup() {
2121}
2222
2323let firstTime = true ;
24- function handleRestart ( 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 @@ -8,7 +8,7 @@ let runner = null;
88function setup ( ) {
99 // Initialize the game Runner.
1010 runner = new Runner ( '.game' , {
11- onReset : handleRestart ,
11+ onReset : handleReset ,
1212 onRunning : handleRunning ,
1313 onCrash : handleCrash
1414 } ) ;
@@ -18,7 +18,7 @@ function setup() {
1818 runner . init ( ) ;
1919}
2020
21- function handleRestart ( tRexes ) {
21+ function handleReset ( tRexes ) {
2222 // Add initialization of tRexes here.
2323 // This method is called everytime the game restarts.
2424}
You can’t perform that action at this time.
0 commit comments