import { OutPacketBase } from 'packets/out/packet' ; import { RoomCountdownType } from 'packets/in/room/countdown' ; class export class OutRoomCountdown { public static build ( shouldCooldown , countdown , outPacket ) { const type = shouldCooldown ? RoomCountdownType . InProgress : RoomCountdownType . Stop ; outPacket . writeUInt8 ( type ) ; if ( type === RoomCountdownType . InProgress ) { outPacket . writeUInt8 ( countdown ) ; } } }