From 915b42bb1383d4083db8aa41c049a03332a805cd Mon Sep 17 00:00:00 2001 From: Theouche Date: Tue, 13 Aug 2024 15:54:53 +0200 Subject: [PATCH] temp erase jcheca part --- pong/game/utils.py | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/pong/game/utils.py b/pong/game/utils.py index e260e81..a1f8e0d 100644 --- a/pong/game/utils.py +++ b/pong/game/utils.py @@ -182,37 +182,4 @@ def get_player_p_win(player_name): return player.p_win -""" def complete_match(match_id, score_player1, score_player2, nbr_ball_touch_p1, nbr_ball_touch_p2, duration): - try: - match = Match.objects.get(id=match_id) - except Match.DoesNotExist: - raise ValidationError(f"Match with id {match_id} does not exist") - - match.score_player1 = score_player1 - match.score_player2 = score_player2 - match.nbr_ball_touch_p1 = nbr_ball_touch_p1 - match.nbr_ball_touch_p2 = nbr_ball_touch_p2 - match.duration = duration - - if score_player1 > score_player2: - match.winner = match.player1 - elif score_player2 > score_player1: - match.winner = match.player2 - else: - match.winner = None - - match.save() - return match """ - -""" def complete_tournoi(tournoi_id, player): - try: - tournoi = Tournoi.objects.get(id = tournoi_id) - except Tournoi.DoesNotExist: - raise ValidationError(f"Tournoi with id {tournoi_id} does not exist") - - tournoi.winner = player - tournoi.save() - return tournoi """ - -