import { PolusBuffer } from "../../../../util/polusBuffer" ; import { PacketHandler } from "../../../packet" ; export interface CastVotePacket { PlayerPlayerID : number ; SuspectPlayerID : number ; } export const CastVote = { parse ( packet ) { return { PlayerPlayerID : packet . readU8 ( ) , SuspectPlayerID : packet . read8 ( ) , } ; } , serialize ( packet ) { var buf = new PolusBuffer ( 2 ) ; buf . writeU8 ( packet . PlayerPlayerID ) ; buf . write8 ( packet . SuspectPlayerID ) ; return buf ; } , } ;