UNPKG

@runox-game/game-engine

Version:
26 lines (25 loc) 751 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Turn = void 0; var Turn = /** @class */ (function () { function Turn() { this.round = 0; this.player = undefined; } Object.defineProperty(Turn.prototype, "valid", { get: function () { return this.player !== undefined && this.player.valid; }, enumerable: false, configurable: true }); Turn.prototype.setPlayerTurn = function (player) { var _a; if (((_a = this.player) === null || _a === void 0 ? void 0 : _a.id) !== player.id) { this.round++; } this.player = player; }; return Turn; }()); exports.Turn = Turn;