import { PolusBuffer } from "../../util/polusBuffer" ; import { Room } from "../../util/room" ; import { PacketHandler } from "../packet" ; import { RoomSettings } from "../packetElements/roomSettings" ; export interface GameCreatePacket { type : "GameCreate" ; RoomSettings : RoomSettings ; } export const GameCreate = { parse ( packet , room ) { var rs = new RoomSettings ( room ) ; rs . parse ( packet ) ; const gameCreatePacket = { type : "GameCreate" , RoomSettings : rs , } ; return gameCreatePacket ; } , serialize ( packet ) { return packet . RoomSettings . serialize ( ) ; } , } ;