mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-29 06:05:36 -08:00
Merge pull request #559 from stevebosman/94_War
94 war case insensitive input
This commit is contained in:
@@ -39,11 +39,11 @@ function input() {
|
||||
async function askYesOrNo(question) {
|
||||
while (1) {
|
||||
print(question);
|
||||
const str = await input();
|
||||
if (str == "YES") {
|
||||
const str = (await input()).toUpperCase();
|
||||
if (str === "YES") {
|
||||
return true;
|
||||
}
|
||||
else if (str == "NO") {
|
||||
else if (str === "NO") {
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user