This commit is contained in:
Theouche 2024-08-22 17:42:24 +02:00
parent ca3d36dd59
commit 5cf91576af
2 changed files with 2 additions and 1 deletions

View File

@ -100,12 +100,14 @@ class Game:
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:
print("Here !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!") print("Here !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
await self.send_game_state()
await self.end_game() await self.end_game()
self.reset_ball() self.reset_ball()
elif self.game_state['ball_position']['x'] >= 790: elif self.game_state['ball_position']['x'] >= 790:
self.game_state['player1_score'] += 1 self.game_state['player1_score'] += 1
if self.game_state['player1_score'] > 2: if self.game_state['player1_score'] > 2:
print("Here !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!") print("Here !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
await self.send_game_state()
await self.end_game() await self.end_game()
self.reset_ball() self.reset_ball()

View File

@ -6,7 +6,6 @@ from datetime import timedelta
from channels.db import database_sync_to_async from channels.db import database_sync_to_async
#from asgiref.sync import database_sync_to_async #from asgiref.sync import database_sync_to_async
async def endfortheouche(p1, p2, s_p1, s_p2, bt_p1, bt_2, dur, is_tournoi, name_tournament): async def endfortheouche(p1, p2, s_p1, s_p2, bt_p1, bt_2, dur, is_tournoi, name_tournament):
try: try:
print("here endfortheouche §!!!") print("here endfortheouche §!!!")