summaryrefslogtreecommitdiff
path: root/tictactoe/morpion
diff options
context:
space:
mode:
Diffstat (limited to 'tictactoe/morpion')
-rwxr-xr-xtictactoe/morpion/base.js19
-rw-r--r--tictactoe/morpion/online.js4
2 files changed, 19 insertions, 4 deletions
diff --git a/tictactoe/morpion/base.js b/tictactoe/morpion/base.js
index b5db1d2..7bb8fd2 100755
--- a/tictactoe/morpion/base.js
+++ b/tictactoe/morpion/base.js
@@ -215,5 +215,20 @@ function airevrand() {
}
window.addEventListener("load", () => {
- if (location.hash === "#/train") train();
-});
+ if (location.hash === "#/train") {
+ train();
+ }
+ if (!location.hash.startsWith("#online/")) {
+ document.getElementById("resetbtn").style.display = "none";
+ }
+
+ if (location.hash === "#/train") {
+ document.title = "Local Game | Tic-Tac-Toe | Minteck Arcade";
+ } else if (location.hash.startsWith("#online/")) {
+ document.title = "Online Game | Tic-Tac-Toe | Minteck Arcade";
+ } else if (location.hash === "#/auto") {
+ document.title = "Automated machine learning | Tic-Tac-Toe | Minteck Arcade";
+ } else {
+ document.title = "Singleplayer Game | Tic-Tac-Toe | Minteck Arcade";
+ }
+}); \ No newline at end of file
diff --git a/tictactoe/morpion/online.js b/tictactoe/morpion/online.js
index c218e79..49bf957 100644
--- a/tictactoe/morpion/online.js
+++ b/tictactoe/morpion/online.js
@@ -1,4 +1,4 @@
-const onlineServer = "wss://tictactoe.minteck.org/server/prod";
+const onlineServer = "wss://arcade.minteck.org/tictactoe/server/prod";
let errorDisconnect = false;
let wcInterval;
let waitCount = 0;
@@ -46,7 +46,7 @@ function online() {
let parts = location.hash.substring(8).split("|");
ws.send(JSON.stringify({
action: 'init',
- room: atob(parts[0]),
+ room: "tictactoe." + atob(parts[0]),
player: atob(parts[1])
}))
}