From dc825ec1cdb7c7c47465bb94c10bd8659af25863 Mon Sep 17 00:00:00 2001 From: Marcel Schwarz Date: Wed, 12 Apr 2023 12:32:09 +0200 Subject: [PATCH] Fix count js import --- .gitignore | 1 + game.html | 12 ++++++++---- game.js | 6 ++++-- 3 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..496ee2c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_Store \ No newline at end of file diff --git a/game.html b/game.html index ec2749d..a4a9d21 100644 --- a/game.html +++ b/game.html @@ -11,8 +11,6 @@ - -
@@ -63,5 +61,11 @@ + + \ No newline at end of file diff --git a/game.js b/game.js index 0b0091e..b2734af 100644 --- a/game.js +++ b/game.js @@ -1,3 +1,5 @@ +import { CountUp } from "./node_modules/countup.js/dist/countUp.min.js"; + var cpuList; var currentCpu; var nextCpu; @@ -18,11 +20,11 @@ function getRandomCpu() { } } -function btnLowerClick() { +export function btnLowerClick() { currentCpu.score < nextCpu.score ? showResult(true) : showResult(false); } -function btnHigherClick() { +export function btnHigherClick() { currentCpu.score > nextCpu.score ? showResult(true) : showResult(false); }