bomb numbers for prompt

number of 1 = radius of 10
number of 2 = radius of 15
number of 3 = radius of 20
...
default: 1
This commit is contained in:
Laetitia (O-01-67) 2022-12-08 11:21:27 -05:00 committed by GitHub
parent b7bb697f01
commit 9f512db224
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -65,7 +65,10 @@ function generatorPrompt() {
generateCloud(elements,true);
break;
case "bomb":
generateBomb(elements,true);
var number = prompt(`Enter a bomb number (default: 1)
1 corresponds to radius 10, 2 corresponds to radius 15, etc.`);
if(isNaN(parseFloat(number))) { number = 1 };
generateBomb(elements,true,number);
break;
default:
alert("An invalid type made it past the if statement. You shouldn't ever see this error.");