modaq
Version:
Quiz Bowl Reader using TypeScript, React, and MobX
43 lines • 1.33 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Player = void 0;
const mobx_1 = require("mobx");
// TODO: Investigate if Team should just have an array of players, since we don't need to normalize these values in mobx
// This could simplify the format
class Player {
constructor(name, teamName, isStarter) {
Object.defineProperty(this, "isStarter", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
Object.defineProperty(this, "name", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
Object.defineProperty(this, "teamName", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
mobx_1.makeAutoObservable(this);
this.name = name;
this.teamName = teamName;
this.isStarter = isStarter;
}
setStarterStatus(isStarter) {
this.isStarter = isStarter;
}
setName(newName) {
this.name = newName;
}
setTeamName(teamName) {
this.teamName = teamName;
}
}
exports.Player = Player;
//# sourceMappingURL=TeamState.js.map