mirror of
https://github.com/YouHaveTrouble/GuildMaster.git
synced 2026-05-12 06:26:59 +00:00
fix remaining typescript errors
This commit is contained in:
@@ -3,10 +3,13 @@ export class Guild {
|
||||
level: number;
|
||||
displayUpgradeCost: number|string;
|
||||
|
||||
upgradeCost: number|null = null;
|
||||
|
||||
constructor(level: number, gold: number) {
|
||||
this.gold = gold;
|
||||
this.level = level;
|
||||
this.displayUpgradeCost = this.getUpgradeCost() ?? "Max level";
|
||||
this.upgradeCost = this.getUpgradeCost();
|
||||
}
|
||||
|
||||
upgrade(): void {
|
||||
@@ -27,6 +30,10 @@ export class Guild {
|
||||
getUpgradeCost(): number|null {
|
||||
return upgradeCosts[this.level] ?? null;
|
||||
}
|
||||
|
||||
isMaxLevel(): boolean {
|
||||
return this.level >= 7;
|
||||
}
|
||||
}
|
||||
|
||||
const upgradeCosts = {
|
||||
|
||||
Reference in New Issue
Block a user