core: split: game and pong
This commit is contained in:
@ -103,7 +103,7 @@ class Player(Spectator):
|
||||
self.position = new_position
|
||||
|
||||
if (invalid_pos):
|
||||
self.send("update_paddle", self.to_dict())
|
||||
self.send("update_player", self.to_dict())
|
||||
|
||||
def connect(self, socket: WebsocketConsumer):
|
||||
self.socket = socket
|
||||
@ -129,13 +129,13 @@ class Player(Spectator):
|
||||
|
||||
data = {
|
||||
"username": self.username,
|
||||
"user_id": self.user_id,
|
||||
"id": self.user_id,
|
||||
"position": self.position.to_dict(),
|
||||
"score": [*self.score],
|
||||
|
||||
"rail": self.rail.to_dict(),
|
||||
|
||||
"is_connected": self.is_connected(),
|
||||
"isConnected": self.is_connected(),
|
||||
}
|
||||
|
||||
return data
|
Reference in New Issue
Block a user