From 13e3a977fec822bdf96077b0c613dc3f07040604 Mon Sep 17 00:00:00 2001 From: nanochess Date: Tue, 16 Feb 2021 16:49:05 -0600 Subject: [PATCH] Solved small bug in ACEY DUCYE Javascript --- 01 Acey Ducey/javascript/aceyducey.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/01 Acey Ducey/javascript/aceyducey.js b/01 Acey Ducey/javascript/aceyducey.js index cefc062f..d0983443 100644 --- a/01 Acey Ducey/javascript/aceyducey.js +++ b/01 Acey Ducey/javascript/aceyducey.js @@ -78,8 +78,8 @@ async function main() do { print("HERE ARE YOUR NEXT TWO CARDS: \n"); do { - a = Math.floor(Math.random() * 12 + 2); - b = Math.floor(Math.random() * 12 + 2); + a = Math.floor(Math.random() * 13 + 2); + b = Math.floor(Math.random() * 13 + 2); } while (a >= b) ; show_card(a); show_card(b); @@ -102,7 +102,7 @@ async function main() break; } } while (m == 0) ; - c = Math.floor(Math.random() * 12 + 2); + c = Math.floor(Math.random() * 13 + 2); show_card(c); if (c > a && c < b) { print("YOU WIN!!!\n");