- update lobbyPage html
    - starting tournmament
Django
    - add new file with comments for explain
This commit is contained in:
Kum1ta
2024-10-01 15:17:58 +02:00
parent 709d0cb25a
commit a8863ad379
8 changed files with 201 additions and 8 deletions

View File

@ -122,6 +122,11 @@
<p>CCCCCCCCCC</p>
<span class="line"></span>
<p>DDDDDDDDDD</p>
<br/><br/><br/><br/>
<span class="line"></span>
<p style="text-align: center;">Tournament code</p>
<br/>
<input id="tournamentCode" class="search-input" type="text" placeholder="Enter the tournament code (empty for create one)">
</div>
<div class="skin-select">

View File

@ -0,0 +1,33 @@
# **************************************************************************** #
# #
# ::: :::::::: #
# tournamentRequest.py :+: :+: :+: #
# +:+ +:+ +:+ #
# By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2024/10/01 13:16:39 by edbernar #+# #+# #
# Updated: 2024/10/01 14:00:29 by edbernar ### ########.fr #
# #
# **************************************************************************** #
# tournament request format : {"type":"tournament", "content":{"action": 1, ...}}
#server actions (actions sent by the server):
# 0 : start : tell the client if tournament is full or not exist. If not, tell the client can start the tournament
# - exist : true/false
# - isFull : true/false
# - started : true/false
# - code : code of the tournament
# 1 : someoneJoin : tell the client someone join the tournament (considering clients will place selon the order of the join)
# - id : id of the player
# - name : name of the player
# - pfp : pfp of the player
# 2 : someoneLeave : tell the client someone leave the tournament (if game not started, players will be replaced in the order of the join)
# - id : id of the player who leave
#client actions (actions sent by the client) :
# 0 : start : start a tournament. if code == "", create a new tournament, else join the tournament with the code
# - code : code of the tournament
# 1 : leave : leave the tournament