94 War - allow case insensitive input

This commit is contained in:
Steve Bosman
2022-02-07 21:24:07 +00:00
parent e99d67787e
commit 5f3aadd2b3

View File

@@ -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 {