aboutsummaryrefslogtreecommitdiff
path: root/index.js
diff options
context:
space:
mode:
authorKaran Jayachandra <karan.jayachandra@nxp.com>2025-11-13 11:58:42 +0100
committerKaran Jayachandra <karan.jayachandra@nxp.com>2025-11-13 11:58:42 +0100
commit05d2f2f943921d6b5c921686c5edce6eb39d23b8 (patch)
treeaa49a02006d88f44a57864a51e680f87ef341a7c /index.js
parent367dacb5057c945027775f992edf69884c8fb650 (diff)
Cleaned up the code quite a bit
Diffstat (limited to 'index.js')
-rw-r--r--index.js10
1 files changed, 1 insertions, 9 deletions
diff --git a/index.js b/index.js
index 9f13cd8..9494abb 100644
--- a/index.js
+++ b/index.js
@@ -1,23 +1,15 @@
import { GameManager } from "./game.mjs";
-import { PlayerManager, addLoadBehaviour } from "./player.mjs";
// Court and player handling
let g = new GameManager();
-let p = new PlayerManager();
-addLoadBehaviour(p);
// Game handling
document.getElementById("propose").addEventListener("click", () => {
- let factor = Number(document.getElementById("skill").value);
- let players = p.normalize(factor);
- console.log(players);
- g.propose(players);
+ g.propose();
});
document.getElementById("confirm").addEventListener("click", () => {
- console.log("Confirm the proposal for round " + g.round + ".");
g.confirm();
});
document.getElementById("reset").addEventListener("click", () => {
- console.log("Resetting the session!");
g.reset();
});