import { Socket } from "socket.io-client";
import { ServerEvent } from "./ServerEvent";
import { PieceId } from "../constants/Pieces";

export type StartRoundEvent = {
  pieceIds: PieceId[];
};

export function attachHandlerToStartRoundEvent(
  socket: Socket,
  handler: (event: StartRoundEvent) => void,
): void {
  socket.once(ServerEvent.START_ROUND, handler);
}
