add is_opponent to move request
This commit is contained in:
@ -6,7 +6,7 @@
|
|||||||
# By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ #
|
# By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ #
|
||||||
# +#+#+#+#+#+ +#+ #
|
# +#+#+#+#+#+ +#+ #
|
||||||
# Created: 2024/09/13 16:20:58 by tomoron #+# #+# #
|
# Created: 2024/09/13 16:20:58 by tomoron #+# #+# #
|
||||||
# Updated: 2024/09/16 14:16:03 by tomoron ### ########.fr #
|
# Updated: 2024/09/16 14:28:57 by tomoron ### ########.fr #
|
||||||
# #
|
# #
|
||||||
# **************************************************************************** #
|
# **************************************************************************** #
|
||||||
|
|
||||||
@ -93,7 +93,7 @@ class Game:
|
|||||||
|
|
||||||
def move(self, socket, pos, up):
|
def move(self, socket, pos, up):
|
||||||
opponent = self.p1 if socket != self.p1 else self.p2
|
opponent = self.p1 if socket != self.p1 else self.p2
|
||||||
opponent.sync_send({"type":"game","content":{"action":3, "pos":pos, "up":up}})
|
opponent.sync_send({"type":"game","content":{"action":3, "pos":pos, "up":up, "is_opponent":True}})
|
||||||
|
|
||||||
async def gameLoop(self):
|
async def gameLoop(self):
|
||||||
self.started = True
|
self.started = True
|
||||||
|
Reference in New Issue
Block a user