
//=======================================================================================

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

/**共用MAIN SPIN協定 */
export interface SpinRequest {
    pay: number;
}

export class CommonSlotSpinRequest extends NetRequest<SpinRequest, JSON> {
    private _id: number = 0;

    get Method(): string {
        return "slot" + this._id + ".spin";
    }

    constructor(slotId: number, totalBet: number) {
        super();
        this._id = slotId;
        this.Data = {
            pay: totalBet,
        };
    }
}
//=======================================================================================
export class CommonSlotFgSpinRequest extends NetRequest<any, JSON> {
    private _id: number = 0;

    get Method(): string {
        return "slot" + this._id + ".fgspin";
    }

    constructor(slotId: number) {
        super();
        this._id = slotId;
    }
}
//=======================================================================================
export class CommonSlotCollectUnlockRequest extends NetRequest<any, JSON> {
    private _id: number = 0;
    get Method(): string {
        return "collect" + this._id + ".unlock";
    }

    constructor(slotId: number, grid: number) {
        super();
        this._id = slotId;
        this.Data = {
            Grid: grid,
        };
    }
}
//=======================================================================================
export class CommonSlotCollectSpinRequest extends NetRequest<any, JSON> {
    private _id: number = 0;
    get Method(): string {
        return "collect" + this._id + ".spin";
    }

    constructor(slotId: number) {
        super();
        this._id = slotId;
    }
}
//=======================================================================================
/**賓果 ChangeSet協定 */
export class CommonBingoChangeSet extends NetRequest<any, JSON> {
    private _id: number = 0;
    get Method(): string {
        return "slot" + this._id + ".chset";
    }
    constructor(slotId: number) {
        super();
        this._id = slotId;
    }
}
//=======================================================================================
