import { PolusBuffer } from "../../util/polusBuffer" ; import { Room } from "../../util/room" ; import { PacketHandler } from "../packet" ; import { DisconnectReason } from "../packetElements/disconnectReason" ; export interface JoinGameErrorPacket { type : "JoinGameError" ; DisconnectReason : DisconnectReason ; } export const JoinGameError = { parse ( packet , room ) { return { type : "JoinGameError" , DisconnectReason : new DisconnectReason ( packet , room ) , } ; } , serialize ( packet ) { return packet . DisconnectReason . serialize ( ) ; } , } ;