File tree 2 files changed +3
-70
lines changed
2 files changed +3
-70
lines changed Original file line number Diff line number Diff line change @@ -27,14 +27,14 @@ function getRandomCard() {
27
27
return Math . floor ( Math . random ( ) * ( max - min + 1 ) + min ) ;
28
28
}
29
29
30
- function getGameCards ( ) {
30
+ function newGameCards ( ) {
31
31
let cardOne = getRandomCard ( ) ;
32
32
let cardTwo = getRandomCard ( ) ;
33
33
let cardThree = getRandomCard ( ) ;
34
34
// We want:
35
35
// 1. cardOne and cardTwo to be different cards
36
36
// 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
38
38
// we will continue to generate random cards.
39
39
while ( cardOne >= cardTwo ) {
40
40
cardOne = getRandomCard ( ) ;
@@ -75,7 +75,7 @@ async function main() {
75
75
76
76
// Loop game forever
77
77
while ( true ) {
78
- let [ cardOne , cardTwo , cardThree ] = getGameCards ( ) ;
78
+ let [ cardOne , cardTwo , cardThree ] = newGameCards ( ) ;
79
79
80
80
print ( `YOU NOW HAVE ${ availableDollars } DOLLARS.\n` ) ;
81
81
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments