From 3d0ea057c7a9852779c3f3f8a8c63af49695e1d6 Mon Sep 17 00:00:00 2001 From: AUnicornWithNoLife Date: Tue, 13 Apr 2021 15:55:37 +0100 Subject: [PATCH] basis fr AI --- src/ai.js | 4 ++++ src/code.js | 10 ++++++++++ src/index.html | 11 +++++++++++ src/var.js | 3 +++ 4 files changed, 28 insertions(+) create mode 100644 src/ai.js diff --git a/src/ai.js b/src/ai.js new file mode 100644 index 0000000..8d5aeba --- /dev/null +++ b/src/ai.js @@ -0,0 +1,4 @@ +function predict() +{ + +} \ No newline at end of file diff --git a/src/code.js b/src/code.js index 7b49934..f3410f1 100644 --- a/src/code.js +++ b/src/code.js @@ -155,4 +155,14 @@ function reset() tabloid.classList.remove('win'); tabloid.classList.remove('lol'); +} + +function mode(id) +{ + if (id != gamemode) + { + gamemode = id; + + reset(); + } } \ No newline at end of file diff --git a/src/index.html b/src/index.html index 917af59..283c022 100644 --- a/src/index.html +++ b/src/index.html @@ -17,6 +17,17 @@ + + + +
+

Gamemode

+
+
+ + +
+
diff --git a/src/var.js b/src/var.js index 62b08ec..4558877 100644 --- a/src/var.js +++ b/src/var.js @@ -4,6 +4,7 @@ var score; var ids; var ptm; var tabloid; +var gamemode; function load() { @@ -56,4 +57,6 @@ function load() ptm = 1; tabloid = document.getElementById('board'); + + gamemode = 1; } \ No newline at end of file