- add new request for start game in tournament
    - fix some bug with style
This commit is contained in:
Kum1ta
2024-10-02 13:50:54 +02:00
parent eb6b2c8ada
commit aab0b9397c
7 changed files with 33 additions and 9 deletions

View File

@ -6,10 +6,12 @@
/* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/01 13:42:29 by edbernar #+# #+# */
/* Updated: 2024/10/02 04:55:51 by edbernar ### ########.fr */
/* Updated: 2024/10/02 13:39:23 by edbernar ### ########.fr */
/* */
/* ************************************************************************** */
import { pageRenderer } from '/static/javascript/main.js';
const playerNb = [1, 2, 4, 5, 13, 14, 15, 16];
const playerList = {
player1: {id: 0, username: null, pfp: null},
@ -116,6 +118,11 @@ class TournamentPage
newText.innerText = `${content.username} : ${content.message}`;
divChat.appendChild(newText);
}
static startGame(content)
{
pageRenderer.changePage("waitingGamePage", false, {username: content.username, id: content.id, isTournament: true})
}
}
function newInfo(message)

View File

@ -16,3 +16,6 @@ typeTournament({action: 1, id: 8, username: "GlitchPhantom", pfp: "https://image
typeTournament({action: 1, id: 9, username: "FrostBiteX", pfp: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQJWyvMlk1053PLnD3PRrz2g_LdQtW2H-M-GQ&s"});
typeTournament({action: 1, id: 10, username: "LunarEcho", pfp: "https://hypixel.net/attachments/1928357/"});
typeTournament({action: 2,id: 3});
typeTournament({action: 3, username: "Eddy", message: "Bonsoir"});
typeTournament({action: 4, username: "Eddy", message: "Bonsoir"});