Method
buyWeapon
(weapon: string, damage: number, price: number)
Source from the content-addressed store, hash-verified
| 75 | } |
| 76 | |
| 77 | private buyWeapon(weapon: string, damage: number, price: number): void{ |
| 78 | if(this.getSuperRPG().getCoins() >= price && this.getSuperRPG().getDamage() < damage){ |
| 79 | this.getSuperRPG().setCoins(this.getSuperRPG().getCoins()-price); |
| 80 | this.getSuperRPG().setWeapon(weapon); |
| 81 | this.getSuperRPG().setDamage(damage); |
| 82 | } |
| 83 | } |
| 84 | } |
Callers
nothing calls this directly
Tested by
no test coverage detected