"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.GameSchema = exports.RoomSchema = exports.DoorSchema = void 0;
const schema_1 = require("@colyseus/schema");
class DoorSchema extends schema_1.Schema {
    constructor() {
        super(...arguments);
        this.isOpened = true;
    }
}
__decorate([
    schema_1.type('uint8')
], DoorSchema.prototype, "index", void 0);
__decorate([
    schema_1.type('boolean')
], DoorSchema.prototype, "isOpened", void 0);
__decorate([
    schema_1.type(['int8'])
], DoorSchema.prototype, "connectsRooms", void 0);
__decorate([
    schema_1.type('int8')
], DoorSchema.prototype, "lockedForTurns", void 0);
exports.DoorSchema = DoorSchema;
class RoomSchema extends schema_1.Schema {
    constructor() {
        super();
        this.doors = new schema_1.MapSchema();
    }
}
__decorate([
    schema_1.type('int8')
], RoomSchema.prototype, "roomNumber", void 0);
__decorate([
    schema_1.type({ 'map': DoorSchema })
], RoomSchema.prototype, "doors", void 0);
exports.RoomSchema = RoomSchema;
class GameSchema extends schema_1.Schema {
    constructor() {
        super();
        this.rooms = new schema_1.ArraySchema();
        this.doors = new schema_1.ArraySchema();
    }
}
__decorate([
    schema_1.type('uint8')
], GameSchema.prototype, "facilitySize", void 0);
__decorate([
    schema_1.type([RoomSchema])
], GameSchema.prototype, "rooms", void 0);
__decorate([
    schema_1.type([DoorSchema])
], GameSchema.prototype, "doors", void 0);
__decorate([
    schema_1.type('int8')
], GameSchema.prototype, "vaccineRoomNumber", void 0);
__decorate([
    schema_1.type('boolean')
], GameSchema.prototype, "vaccineIsStolen", void 0);
__decorate([
    schema_1.type('int8')
], GameSchema.prototype, "spyRoomNumber", void 0);
__decorate([
    schema_1.type('string')
], GameSchema.prototype, "whosTurn", void 0);
exports.GameSchema = GameSchema;
//# sourceMappingURL=GameSchema.js.map