import { NetRequest } from "@/Engine/CatanEngine/NetManagerV2/NetRequest";

// #region Request

export type RpcGamInfoResponse = JSON
export class GameInfoRequest extends NetRequest<null, RpcGamInfoResponse> {
	get Method(): string {
		return "game.info";
	}
	constructor() {
		super();
	}
}

export type RpcGameLaunchRequest = number[]
export type RpcGameLaunchResponse = string
/** 廠商ID 遊戲ID */
export class GameLaunchRequest extends NetRequest<RpcGameLaunchRequest, RpcGameLaunchResponse> {
	get Method(): string {
		return "game.launch";
	}
	constructor(companyId: number, slotId: number) {
		super();
		this.Data = [
			companyId,
			slotId
		];
	}
}

export type RpcGameLeaveRequest = number
export type RpcGameLeaveResponse = null
export class GameLeaveRequest extends NetRequest<RpcGameLeaveRequest, RpcGameLeaveResponse> {
	get Method(): string {
		return "game.leave";
	}
	constructor(id: number) {
		super();
		this.Data = id;
	}
}

// #endregion