File tree Expand file tree Collapse file tree 2 files changed +3
-70
lines changed Expand file tree Collapse file tree 2 files changed +3
-70
lines changed Original file line number Diff line number Diff line change @@ -27,14 +27,14 @@ function getRandomCard() {
2727 return Math . floor ( Math . random ( ) * ( max - min + 1 ) + min ) ;
2828}
2929
30- function getGameCards ( ) {
30+ function newGameCards ( ) {
3131 let cardOne = getRandomCard ( ) ;
3232 let cardTwo = getRandomCard ( ) ;
3333 let cardThree = getRandomCard ( ) ;
3434 // We want:
3535 // 1. cardOne and cardTwo to be different cards
3636 // 2. cardOne to be lower than cardTwo
37- // So, while cardOne is greater than or equal two cardTwo
37+ // So, while cardOne is greater than or equal too cardTwo
3838 // we will continue to generate random cards.
3939 while ( cardOne >= cardTwo ) {
4040 cardOne = getRandomCard ( ) ;
@@ -75,7 +75,7 @@ async function main() {
7575
7676 // Loop game forever
7777 while ( true ) {
78- let [ cardOne , cardTwo , cardThree ] = getGameCards ( ) ;
78+ let [ cardOne , cardTwo , cardThree ] = newGameCards ( ) ;
7979
8080 print ( `YOU NOW HAVE ${ availableDollars } DOLLARS.\n` ) ;
8181
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments