Update Day Four because I forgot how exponents work

This commit is contained in:
Lewis Dale 2023-12-04 08:17:01 +00:00
parent dcff332499
commit 8fadb42040

View File

@ -28,7 +28,7 @@ export class Scratchcard {
if (!matches.length) return 0; if (!matches.length) return 0;
if (matches.length === 1) return 1; if (matches.length === 1) return 1;
return Math.pow(2, Math.max(matches.length - 1, 1)); return Math.pow(2, matches.length - 1);
} }
get isWinner() { get isWinner() {