mirror of
https://github.com/AudebertAdrien/ft_transcendence.git
synced 2025-12-15 21:56:50 +01:00
failed with chaku
This commit is contained in:
commit
097ac69ddc
2
makefile
2
makefile
@ -15,7 +15,7 @@ NC=\033[0m # No Color (reset)
|
|||||||
|
|
||||||
up: down ssl-certs
|
up: down ssl-certs
|
||||||
$(COMPOSE) build
|
$(COMPOSE) build
|
||||||
$(COMPOSE) up -d $(CONTAINER) || true
|
$(COMPOSE) up $(CONTAINER) -d || true
|
||||||
|
|
||||||
build:
|
build:
|
||||||
$(COMPOSE) build $(CONTAINER)
|
$(COMPOSE) build $(CONTAINER)
|
||||||
|
|||||||
@ -65,8 +65,8 @@ class Game:
|
|||||||
if self.botgame:
|
if self.botgame:
|
||||||
x += 1
|
x += 1
|
||||||
if x == 60:
|
if x == 60:
|
||||||
# Random BOT difficulty..
|
# Random BOT difficulty.. or not
|
||||||
steps = 60#random.randint(10, 60)
|
steps = 60 # random.randint(10, 60)
|
||||||
self.future_ball_position = await self.predict_ball_trajectory(steps)
|
self.future_ball_position = await self.predict_ball_trajectory(steps)
|
||||||
x = 0
|
x = 0
|
||||||
if self.botgame:
|
if self.botgame:
|
||||||
@ -77,19 +77,16 @@ class Game:
|
|||||||
await asyncio.sleep(1/60) # Around 60 FPS
|
await asyncio.sleep(1/60) # Around 60 FPS
|
||||||
|
|
||||||
async def update_bot_position(self):
|
async def update_bot_position(self):
|
||||||
#future_ball_position = self.predict_ball_trajectory()
|
|
||||||
target_y = self.future_ball_position['y']
|
target_y = self.future_ball_position['y']
|
||||||
player2_position = self.game_state['player2_position']
|
player2_position = self.game_state['player2_position']
|
||||||
|
|
||||||
# Adjusts bot position based on expected ball position
|
# Adjusts BOT position based on expected ball position
|
||||||
if player2_position < target_y < player2_position + 80:
|
if player2_position < target_y < player2_position + 80:
|
||||||
pass #bot already placed
|
pass # BOT already placed
|
||||||
elif player2_position < target_y:
|
elif player2_position < target_y:
|
||||||
self.p2_mov = 1
|
self.p2_mov = 1
|
||||||
#self.game_state['player2_position'] = min(player2_position + (50 * self.speed), 300)
|
|
||||||
elif player2_position + 80 > target_y:
|
elif player2_position + 80 > target_y:
|
||||||
self.p2_mov = -1
|
self.p2_mov = -1
|
||||||
#self.game_state['player2_position'] = max(player2_position - (50 * self.speed), 0)
|
|
||||||
|
|
||||||
async def predict_ball_trajectory(self, steps=60):
|
async def predict_ball_trajectory(self, steps=60):
|
||||||
future_x = self.game_state['ball_position']['x']
|
future_x = self.game_state['ball_position']['x']
|
||||||
@ -132,7 +129,7 @@ class Game:
|
|||||||
self.game_state['ball_velocity']['x'] *= -1
|
self.game_state['ball_velocity']['x'] *= -1
|
||||||
self.bt2 += 1
|
self.bt2 += 1
|
||||||
self.update_ball_velocity()
|
self.update_ball_velocity()
|
||||||
# Check if some player won the game
|
# Check if someone won the game (score: 3)
|
||||||
if self.game_state['ball_position']['x'] <= 10:
|
if self.game_state['ball_position']['x'] <= 10:
|
||||||
self.game_state['player2_score'] += 1
|
self.game_state['player2_score'] += 1
|
||||||
if self.game_state['player2_score'] > 2:
|
if self.game_state['player2_score'] > 2:
|
||||||
@ -218,8 +215,6 @@ class Game:
|
|||||||
async def end_game(self, disconnected_player=None):
|
async def end_game(self, disconnected_player=None):
|
||||||
if not self.ended:
|
if not self.ended:
|
||||||
self.ended = True
|
self.ended = True
|
||||||
#if self.game_loop_task:
|
|
||||||
# self.game_loop_task.cancel()
|
|
||||||
print(f"- Game #{self.game_id} ENDED --- ({self})")
|
print(f"- Game #{self.game_id} ENDED --- ({self})")
|
||||||
|
|
||||||
end_time = datetime.now()
|
end_time = datetime.now()
|
||||||
@ -252,9 +247,3 @@ class Game:
|
|||||||
await sync_to_async(handle_game_data)(self.game_state['player1_name'], self.game_state['player2_name'],
|
await sync_to_async(handle_game_data)(self.game_state['player1_name'], self.game_state['player2_name'],
|
||||||
self.game_state['player1_score'], self.game_state['player2_score'],
|
self.game_state['player1_score'], self.game_state['player2_score'],
|
||||||
self.bt1, self.bt2, duration, avd, d)
|
self.bt1, self.bt2, duration, avd, d)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -41,7 +41,7 @@ class MatchMaker:
|
|||||||
await asyncio.sleep(1)
|
await asyncio.sleep(1)
|
||||||
self.timer += 1
|
self.timer += 1
|
||||||
# Waiting for more than 30s -> BOT game
|
# Waiting for more than 30s -> BOT game
|
||||||
if self.timer >= 15 and self.waiting_players:
|
if self.timer >= 30 and self.waiting_players:
|
||||||
player1 = self.waiting_players.pop(0)
|
player1 = self.waiting_players.pop(0)
|
||||||
print(f"*** MATCH FOUND: {player1.user.username} vs BOT")
|
print(f"*** MATCH FOUND: {player1.user.username} vs BOT")
|
||||||
self.botgame = True
|
self.botgame = True
|
||||||
|
|||||||
@ -41,7 +41,7 @@ class TournamentMatchMaker:
|
|||||||
self.rounds = []
|
self.rounds = []
|
||||||
self.current_round = 0
|
self.current_round = 0
|
||||||
self.games = 0
|
self.games = 0
|
||||||
self.tournament_state = "waiting" #Can be "waiting", "in_progress", or "ended"
|
self.tournament_state = "waiting" # Can be "waiting", "in_progress", or "ended"
|
||||||
self.name = random.choice(TOURNAMENT_NAMES)
|
self.name = random.choice(TOURNAMENT_NAMES)
|
||||||
self.final_name = ""
|
self.final_name = ""
|
||||||
self.tournoi_reg = None
|
self.tournoi_reg = None
|
||||||
@ -81,14 +81,11 @@ class TournamentMatchMaker:
|
|||||||
self.waiting_players.remove(player)
|
self.waiting_players.remove(player)
|
||||||
await self.update_waiting_room()
|
await self.update_waiting_room()
|
||||||
|
|
||||||
# Tournament start method
|
# Tournament START method
|
||||||
async def start_tournament(self):
|
async def start_tournament(self):
|
||||||
if len(self.waiting_players) < 3:
|
if len(self.waiting_players) < 3:
|
||||||
return False
|
return False
|
||||||
random.shuffle(self.waiting_players)
|
random.shuffle(self.waiting_players)
|
||||||
'''if (len(self.waiting_players) % 2) != 0:
|
|
||||||
print("Adding a BYE to the tournament..")
|
|
||||||
await self.add_player(None)'''
|
|
||||||
self.tournament_state = "in_progress"
|
self.tournament_state = "in_progress"
|
||||||
self.current_round = 0
|
self.current_round = 0
|
||||||
len_tournament = await sync_to_async(getlen)()
|
len_tournament = await sync_to_async(getlen)()
|
||||||
@ -121,7 +118,6 @@ class TournamentMatchMaker:
|
|||||||
for i in range(0, len(players), 2):
|
for i in range(0, len(players), 2):
|
||||||
self.games += 1
|
self.games += 1
|
||||||
if i + 1 < len(players):
|
if i + 1 < len(players):
|
||||||
# Create a new instance of TournamentMatch for this round
|
|
||||||
match = TournamentMatch(self.games, players[i], players[i + 1], self)
|
match = TournamentMatch(self.games, players[i], players[i + 1], self)
|
||||||
matches.append(match)
|
matches.append(match)
|
||||||
else:
|
else:
|
||||||
@ -177,11 +173,10 @@ class TournamentMatchMaker:
|
|||||||
elif match.player1:
|
elif match.player1:
|
||||||
# Handle BYE match
|
# Handle BYE match
|
||||||
await match_maker.notify_players(match.player1, match.player2, match.game_id, False)
|
await match_maker.notify_players(match.player1, match.player2, match.game_id, False)
|
||||||
#asyncio.create_task(match.start_game())
|
|
||||||
match.game_state['player1_score'] = 3
|
match.game_state['player1_score'] = 3
|
||||||
match.game_state['player2_score'] = 0
|
match.game_state['player2_score'] = 0
|
||||||
await match.end_game()
|
await match.end_game()
|
||||||
await self.send_game_text(match.player1, "You lucky bastard!\n You got an auto-win!")
|
await self.send_game_text(match.player1, "You lucky bastard!\nYou got an auto-win!")
|
||||||
|
|
||||||
async def send_game_text(self, player, text):
|
async def send_game_text(self, player, text):
|
||||||
message = json.dumps({
|
message = json.dumps({
|
||||||
@ -195,7 +190,6 @@ class TournamentMatchMaker:
|
|||||||
for match in self.rounds[-1]:
|
for match in self.rounds[-1]:
|
||||||
if match.ended:
|
if match.ended:
|
||||||
winner = match.player1 if match.game_state['player1_score'] > match.game_state['player2_score'] else match.player2
|
winner = match.player1 if match.game_state['player1_score'] > match.game_state['player2_score'] else match.player2
|
||||||
#if winner:
|
|
||||||
winners.append(winner)
|
winners.append(winner)
|
||||||
return winners
|
return winners
|
||||||
|
|
||||||
|
|||||||
@ -8,31 +8,21 @@ from datetime import timedelta
|
|||||||
from channels.db import database_sync_to_async
|
from channels.db import database_sync_to_async
|
||||||
|
|
||||||
def handle_game_data(p1, p2, s_p1, s_p2, bt_p1, bt_2, dur, is_tournoi, name_tournament):
|
def handle_game_data(p1, p2, s_p1, s_p2, bt_p1, bt_2, dur, is_tournoi, name_tournament):
|
||||||
try:
|
player_1 = get_or_create_player(p1)
|
||||||
player_1 = get_or_create_player(p1)
|
player_2 = get_or_create_player(p2)
|
||||||
player_2 = get_or_create_player(p2)
|
|
||||||
|
|
||||||
print("CHAKU & THEOUCHE are the BEST")
|
create_match(player_1, player_2, s_p1, s_p2, bt_p1, bt_2, dur, is_tournoi, name_tournament)
|
||||||
create_match(player_1, player_2, s_p1, s_p2, bt_p1, bt_2, dur, is_tournoi, name_tournament)
|
|
||||||
print("and ADRIANO is the PEST")
|
|
||||||
|
|
||||||
update_player_statistics(p1)
|
update_player_statistics(p1)
|
||||||
print("UPDATE PLAYER 1")
|
update_player_statistics(p2)
|
||||||
update_player_statistics(p2)
|
|
||||||
print("UPDATE PLAYER 2")
|
|
||||||
|
|
||||||
except Exception as e:
|
|
||||||
print(f"Error in endfortheouche: {e}")
|
|
||||||
|
|
||||||
def get_player_by_name(name):
|
def get_player_by_name(name):
|
||||||
exists = Player.objects.filter(name=name).exists()
|
exists = Player.objects.filter(name=name).exists()
|
||||||
return exists
|
return exists
|
||||||
|
|
||||||
|
|
||||||
def get_player(name):
|
def get_player(name):
|
||||||
return Player.objects.get(name=name)
|
return Player.objects.get(name=name)
|
||||||
|
|
||||||
|
|
||||||
def get_or_create_player(name):
|
def get_or_create_player(name):
|
||||||
player_exists = get_player_by_name(name)
|
player_exists = get_player_by_name(name)
|
||||||
if not player_exists:
|
if not player_exists:
|
||||||
@ -42,7 +32,6 @@ def get_or_create_player(name):
|
|||||||
player = get_player(name)
|
player = get_player(name)
|
||||||
return player
|
return player
|
||||||
|
|
||||||
|
|
||||||
def create_player(
|
def create_player(
|
||||||
name,
|
name,
|
||||||
total_match=0,
|
total_match=0,
|
||||||
@ -105,18 +94,14 @@ def create_match(player1, player2, score_player1, score_player2, nbr_ball_touch_
|
|||||||
return match
|
return match
|
||||||
|
|
||||||
def update_player_statistics(player_name):
|
def update_player_statistics(player_name):
|
||||||
print(f"HERE for {player_name} §§§§§§§§§§§§")
|
|
||||||
player = get_object_or_404(Player, name=player_name)
|
player = get_object_or_404(Player, name=player_name)
|
||||||
print(f"GET PLAYER {player.name} !!!!!!")
|
|
||||||
|
|
||||||
matches_as_player1 = Match.objects.filter(player1=player)
|
matches_as_player1 = Match.objects.filter(player1=player)
|
||||||
#print(f"GET MATCH AS PLAYER 1 {matches_as_player1.player1.name} !!!!!!")
|
|
||||||
matches_as_player2 = Match.objects.filter(player2=player)
|
matches_as_player2 = Match.objects.filter(player2=player)
|
||||||
#print(f"GET MATCH AS PLAYER 2 {matches_as_player2.player2.name} !!!!!!")
|
|
||||||
|
|
||||||
total_match = matches_as_player1.count() + matches_as_player2.count()
|
total_match = matches_as_player1.count() + matches_as_player2.count()
|
||||||
|
|
||||||
# avoid dividing by 0
|
# Avoid dividing by 0
|
||||||
if total_match == 0:
|
if total_match == 0:
|
||||||
player.total_match = total_match
|
player.total_match = total_match
|
||||||
player.total_win = 0
|
player.total_win = 0
|
||||||
@ -184,24 +169,16 @@ def get_player_p_win(player_name):
|
|||||||
return player.p_win
|
return player.p_win
|
||||||
|
|
||||||
def create_tournament(name, nbr_player):
|
def create_tournament(name, nbr_player):
|
||||||
print("tournoi created!!!")
|
|
||||||
tournoi=Tournoi(name=name, nbr_player=nbr_player, winner=None)
|
tournoi=Tournoi(name=name, nbr_player=nbr_player, winner=None)
|
||||||
tournoi.save()
|
tournoi.save()
|
||||||
print(f"tournoi name : {tournoi.name} *******!*!*!*!**!*!**!*!*!*!*!*!*!*!*!*")
|
|
||||||
return tournoi
|
return tournoi
|
||||||
|
|
||||||
def update_tournament(name_tournoi, winner_name):
|
def update_tournament(name_tournoi, winner_name):
|
||||||
tournoi = get_object_or_404(Tournoi, name=name_tournoi)
|
tournoi = get_object_or_404(Tournoi, name=name_tournoi)
|
||||||
winner_p = get_object_or_404(Player, name=winner_name)
|
winner_p = get_object_or_404(Player, name=winner_name)
|
||||||
print(f"in update tourna - tournoi name : {tournoi.name} *******!*!*!*!**!*!**!*!*!*!*!*!*!*!*!*")
|
|
||||||
print(f"in update tourna - winner is : {winner_p.name} *******!*!*!*!**!*!**!*!*!*!*!*!*!*!*!*")
|
|
||||||
|
|
||||||
tournoi.winner = winner_p
|
tournoi.winner = winner_p
|
||||||
print(f"in update tourna - TOURNOI winner is : {tournoi.winner.name} *******!*!*!*!**!*!**!*!*!*!*!*!*!*!*!*")
|
|
||||||
tournoi.save()
|
tournoi.save()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def getlen():
|
def getlen():
|
||||||
return Tournoi.objects.count()
|
return Tournoi.objects.count()
|
||||||
|
|||||||
@ -8,8 +8,6 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
const tournoiList = document.getElementById('tournoi-list');
|
const tournoiList = document.getElementById('tournoi-list');
|
||||||
const blockchainList = document.getElementById('blockchain-list');
|
const blockchainList = document.getElementById('blockchain-list');
|
||||||
|
|
||||||
const logo = document.querySelector('.logo');
|
|
||||||
|
|
||||||
menuButton.addEventListener('click', toggleMenu);
|
menuButton.addEventListener('click', toggleMenu);
|
||||||
|
|
||||||
function toggleMenu() {
|
function toggleMenu() {
|
||||||
@ -27,7 +25,6 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
if (matchList) matchList.style.display = 'none';
|
if (matchList) matchList.style.display = 'none';
|
||||||
if (tournoiList) tournoiList.style.display = 'none';
|
if (tournoiList) tournoiList.style.display = 'none';
|
||||||
if (blockchainList) blockchainList.style.display = 'none';
|
if (blockchainList) blockchainList.style.display = 'none';
|
||||||
logo.style.display = 'block';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const links = document.querySelectorAll('#dropdown-menu a');
|
const links = document.querySelectorAll('#dropdown-menu a');
|
||||||
@ -42,7 +39,6 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
|
|
||||||
function showTable(tableId) {
|
function showTable(tableId) {
|
||||||
hideAllTables();
|
hideAllTables();
|
||||||
logo.style.display = 'none';
|
|
||||||
|
|
||||||
if (tableId === 'player-list') {
|
if (tableId === 'player-list') {
|
||||||
playerList.style.display = 'block';
|
playerList.style.display = 'block';
|
||||||
@ -262,9 +258,6 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (logo.style.display === 'block'){
|
|
||||||
logo.style.display = 'none';
|
|
||||||
}
|
|
||||||
const rows = document.querySelectorAll('#player-list tbody tr');
|
const rows = document.querySelectorAll('#player-list tbody tr');
|
||||||
const playerNames = [];
|
const playerNames = [];
|
||||||
const totalMatches = [];
|
const totalMatches = [];
|
||||||
@ -401,4 +394,4 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@ -30,6 +30,8 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
const gameContainer = document.getElementById('game1');
|
const gameContainer = document.getElementById('game1');
|
||||||
const tournamentContainer = document.getElementById('tournament-bracket');
|
const tournamentContainer = document.getElementById('tournament-bracket');
|
||||||
|
|
||||||
|
const burgerMenu = document.querySelector('.navbar');
|
||||||
|
|
||||||
const pongElements = document.getElementById('pong-elements');
|
const pongElements = document.getElementById('pong-elements');
|
||||||
const logo = document.querySelector('.logo');
|
const logo = document.querySelector('.logo');
|
||||||
|
|
||||||
@ -164,6 +166,9 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
loginForm.style.display = 'none';
|
loginForm.style.display = 'none';
|
||||||
document.getElementById("post-form-buttons").style.display = 'block';
|
document.getElementById("post-form-buttons").style.display = 'block';
|
||||||
history.pushState({ view: 'post-form-buttons' }, '', `#${'post-form-buttons'}`);
|
history.pushState({ view: 'post-form-buttons' }, '', `#${'post-form-buttons'}`);
|
||||||
|
burgerMenu.style.display = 'block';
|
||||||
|
logo.style.display = 'none';
|
||||||
|
pongElements.style.display = 'none';
|
||||||
} else {
|
} else {
|
||||||
alert('Authentication failed. Please try again.');
|
alert('Authentication failed. Please try again.');
|
||||||
}
|
}
|
||||||
@ -328,8 +333,6 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
player2_name: nickname2
|
player2_name: nickname2
|
||||||
};
|
};
|
||||||
gameContainer.style.display = 'flex';
|
gameContainer.style.display = 'flex';
|
||||||
logo.style.display = 'none';
|
|
||||||
pongElements.style.display = 'none';
|
|
||||||
formBlock.style.display = 'none';
|
formBlock.style.display = 'none';
|
||||||
startWebSocketConnection(token, 2);
|
startWebSocketConnection(token, 2);
|
||||||
}
|
}
|
||||||
@ -339,8 +342,6 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
type: 'quick'
|
type: 'quick'
|
||||||
}
|
}
|
||||||
gameContainer.style.display = 'flex';
|
gameContainer.style.display = 'flex';
|
||||||
logo.style.display = 'none';
|
|
||||||
pongElements.style.display = 'none';
|
|
||||||
formBlock.style.display = 'none';
|
formBlock.style.display = 'none';
|
||||||
document.getElementById('player1-name').textContent = "player 1";
|
document.getElementById('player1-name').textContent = "player 1";
|
||||||
document.getElementById('player2-name').textContent = "player 2";
|
document.getElementById('player2-name').textContent = "player 2";
|
||||||
@ -356,8 +357,6 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
type: 'tournoi'
|
type: 'tournoi'
|
||||||
}
|
}
|
||||||
tournamentContainer.style.display = 'flex';
|
tournamentContainer.style.display = 'flex';
|
||||||
logo.style.display = 'none';
|
|
||||||
pongElements.style.display = 'none';
|
|
||||||
formBlock.style.display = 'none';
|
formBlock.style.display = 'none';
|
||||||
startWebSocketConnection(token, 42);
|
startWebSocketConnection(token, 42);
|
||||||
}
|
}
|
||||||
@ -409,7 +408,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
console.error(data.message);
|
console.error(data.message);
|
||||||
} else if (data.type === 'update_tournament_waiting_room') {
|
} else if (data.type === 'update_tournament_waiting_room') {
|
||||||
// Update the HTML content of the tournament bracket
|
// Update the HTML content of the tournament bracket
|
||||||
document.getElementById('tournament-bracket').innerHTML = data.html;
|
tournamentContainer.innerHTML = data.html;
|
||||||
// Reattach the event listener to the "Start Tournament" button
|
// Reattach the event listener to the "Start Tournament" button
|
||||||
const startButton = document.getElementById('start-tournament-btn');
|
const startButton = document.getElementById('start-tournament-btn');
|
||||||
if (startButton) {
|
if (startButton) {
|
||||||
@ -424,7 +423,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
}
|
}
|
||||||
} else if (data.type === 'update_brackets') {
|
} else if (data.type === 'update_brackets') {
|
||||||
// Update the HTML content of the tournament bracket
|
// Update the HTML content of the tournament bracket
|
||||||
document.getElementById('tournament-bracket').innerHTML = data.html;
|
tournamentContainer.innerHTML = data.html;
|
||||||
} else if (data.type === 'tournament_end') {
|
} else if (data.type === 'tournament_end') {
|
||||||
console.log('Tournament ended, the winner is:', data.winner);
|
console.log('Tournament ended, the winner is:', data.winner);
|
||||||
} else {
|
} else {
|
||||||
@ -498,11 +497,8 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
homeButton.addEventListener('click', () => {
|
homeButton.addEventListener('click', () => {
|
||||||
gameContainer.style.display = 'none';
|
gameContainer.style.display = 'none';
|
||||||
gameControls.style.display = 'none';
|
gameControls.style.display = 'none';
|
||||||
|
|
||||||
logo.style.display = 'block'
|
|
||||||
|
|
||||||
formBlock.style.display = 'block';
|
formBlock.style.display = 'block';
|
||||||
postFormButtons.style.display = 'flex';
|
postFormButtons.style.display = 'block';
|
||||||
history.pushState({ view: 'post-form-buttons' }, '', `#${'post-form-buttons'}`);
|
history.pushState({ view: 'post-form-buttons' }, '', `#${'post-form-buttons'}`);
|
||||||
|
|
||||||
setupFirstPlayer();
|
setupFirstPlayer();
|
||||||
|
|||||||
@ -93,7 +93,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="navbar">
|
<div class="navbar" style="display: none;">
|
||||||
<button class="burger-menu">☰</button>
|
<button class="burger-menu">☰</button>
|
||||||
<div id="dropdown-menu" class="dropdown-content">
|
<div id="dropdown-menu" class="dropdown-content">
|
||||||
<a href="#" data-table="player-list">Players</a>
|
<a href="#" data-table="player-list">Players</a>
|
||||||
@ -123,6 +123,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<div id="game-controls" style="display: none;">
|
||||||
|
<button id="home">Home</button>
|
||||||
|
<button id="retry">Rejouer</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div id="match-list" class="content-list" style="display: none;">
|
<div id="match-list" class="content-list" style="display: none;">
|
||||||
<h1>Matches</h1>
|
<h1>Matches</h1>
|
||||||
<input type="text" id="search-match-player" placeholder="Rechercher par nom de joueur">
|
<input type="text" id="search-match-player" placeholder="Rechercher par nom de joueur">
|
||||||
|
|||||||
@ -258,7 +258,6 @@ button:hover {
|
|||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.navbar {
|
.navbar {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 30px;
|
top: 30px;
|
||||||
@ -401,7 +400,7 @@ pre {
|
|||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
.tournament-waiting-room {
|
.tournament-waiting-room {
|
||||||
background-color: rgba(0, 0, 0, 0.6);
|
background-color: rgba(0, 0, 0, 0.6);
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
@ -432,7 +431,7 @@ pre {
|
|||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
body {
|
body {
|
||||||
color: rgb(0, 255, 255); /* Valeur par défaut */
|
color: rgb(0, 255, 255); /* Valeur par défaut */
|
||||||
font-family: Arial, sans-serif;
|
font-family: Arial, sans-serif;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user