aboutsummaryrefslogtreecommitdiff
path: root/src/main.js
diff options
context:
space:
mode:
authorKaran Jayachandra <mail@karanjayachandra.com>2025-11-13 21:48:40 +0100
committerKaran Jayachandra <mail@karanjayachandra.com>2025-11-13 21:48:40 +0100
commit944fc2715e967a51e4ccca49d87e987ee2727bc2 (patch)
tree13ed83b34182d54f9aa85a63c2474a927a6e06b2 /src/main.js
parentb2befab1d7c0bb19ac7373ea27d22cec0eea5163 (diff)
Transitioned to npm
Diffstat (limited to 'src/main.js')
-rw-r--r--src/main.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/main.js b/src/main.js
new file mode 100644
index 0000000..91ac386
--- /dev/null
+++ b/src/main.js
@@ -0,0 +1,20 @@
+import 'notyf/notyf.min.css'
+import 'bulma/css/bulma.css'
+import '@fortawesome/fontawesome-free/css/all.css'
+import './style.css'
+
+import { GameManager } from "./game.mjs";
+
+// Court and player handling
+let g = new GameManager();
+
+// Game handling
+document.getElementById("propose").addEventListener("click", () => {
+ g.propose();
+});
+document.getElementById("confirm").addEventListener("click", () => {
+ g.confirm();
+});
+document.getElementById("reset").addEventListener("click", () => {
+ g.reset();
+});