@ -0,0 +1,17 @@ |
|||||||
|
.resource-icon { |
||||||
|
max-height: 1.5em; |
||||||
|
display: inline; |
||||||
|
} |
||||||
|
|
||||||
|
.building-icon { |
||||||
|
max-height: 3em; |
||||||
|
padding-right: 1em; |
||||||
|
} |
||||||
|
|
||||||
|
.card { |
||||||
|
margin-bottom: 2em; |
||||||
|
} |
||||||
|
|
||||||
|
.progress { |
||||||
|
margin-top: 1em; |
||||||
|
} |
After Width: | Height: | Size: 4.9 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 6.5 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 6.0 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 6.4 KiB |
After Width: | Height: | Size: 5.6 KiB |
After Width: | Height: | Size: 4.5 KiB |
@ -1,34 +0,0 @@ |
|||||||
class MoneyManager { |
|
||||||
constructor(startMoney = null) { |
|
||||||
this.money = startMoney ?? this.getSavedMoney(); |
|
||||||
return this.saveMoney(); |
|
||||||
} |
|
||||||
|
|
||||||
saveMoney() { |
|
||||||
localStorage.setItem('money', String(this.money)); |
|
||||||
return this.getSavedMoney(); |
|
||||||
} |
|
||||||
|
|
||||||
getSavedMoney() { |
|
||||||
this.money = Number(localStorage.getItem('money') ?? 0); |
|
||||||
return this.money; |
|
||||||
} |
|
||||||
|
|
||||||
add(amount = 0) { |
|
||||||
this.money += amount; |
|
||||||
return this.saveMoney(); |
|
||||||
} |
|
||||||
|
|
||||||
sub(amount = 0) { |
|
||||||
this.money -= amount; |
|
||||||
return this.saveMoney(); |
|
||||||
} |
|
||||||
|
|
||||||
getAmount() { |
|
||||||
return this.money; |
|
||||||
} |
|
||||||
|
|
||||||
getAmountFormatted() { |
|
||||||
return Intl.NumberFormat('de-DE', {style: 'currency', currency: 'EUR'}).format(this.money); |
|
||||||
} |
|
||||||
} |
|