Fix some stuff!
This commit is contained in:
parent
57cd0544f4
commit
707c4b5296
|
@ -80,7 +80,8 @@ async def ws_room(ws: WebSocket, code: str, kind: str):
|
|||
await ws.send_text("you fucked up dawg")
|
||||
await ws.close()
|
||||
return
|
||||
|
||||
if len(name) > 25:
|
||||
return ws.close(1009)
|
||||
p = Player(name=name, uuid=uuid.uuid4())
|
||||
|
||||
if not room.admin_uuid:
|
||||
|
|
|
@ -21,6 +21,7 @@ class RoundStart(BaseModel):
|
|||
czar: int
|
||||
card: Card
|
||||
|
||||
|
||||
class PubPlayer(BaseModel):
|
||||
name: str
|
||||
points: int = 0
|
||||
|
@ -40,24 +41,30 @@ class PubRoom(BaseModel):
|
|||
players: List[PubPlayer] = [] # List of player's uuids
|
||||
started: bool = False
|
||||
played_cards: List[int] = []
|
||||
packs: List[str] = []
|
||||
|
||||
|
||||
class Answer(BaseModel):
|
||||
text: List[str]
|
||||
|
||||
|
||||
class AnswerReceived(Answer):
|
||||
uuid: str
|
||||
|
||||
|
||||
class AnswerSending(Answer):
|
||||
index: int
|
||||
|
||||
|
||||
class AnswerSendingButItHasAUUIDBecauseItIsImportantToCheckIfItWasSentByTheCzar(AnswerSending):
|
||||
uuid: str
|
||||
|
||||
|
||||
class Room(PubRoom):
|
||||
players: List[Player] = [] # List of player's uuids
|
||||
number: int
|
||||
admin_uuid: UUID4 = None
|
||||
answers:List[AnswerSending] = []
|
||||
answers: List[AnswerSending] = []
|
||||
# def __init__(self, number):
|
||||
# super().__init__()
|
||||
# self.number = number
|
||||
|
|
|
@ -18131,4 +18131,3 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue