1
0
forked from mico/idle_moloch

Added test for last boss uniqueness

This commit is contained in:
mic0 2024-10-31 13:50:35 +01:00
parent 8d845e9890
commit 9f6d94c8f7
Signed by: mico
GPG Key ID: A3F8023524CF1C8D
2 changed files with 7 additions and 3 deletions

View File

@ -28,7 +28,7 @@ contract RaidGeld is ERC20, Ownable, Constants {
// Events
event PlayerRegistered(address indexed player, uint256 initialGeld);
event PleyerStrikesAgain(address indexed player, uint256 totalRewards, uint256 initialGeld);
event PlayerStrikesAgain(address indexed player, uint256 totalRewards, uint256 initialGeld);
event RaidPerformed(address indexed player, uint256 totalMinted, uint256 geldBalance);
event UnitAdded(
address indexed player,
@ -80,8 +80,7 @@ contract RaidGeld is ERC20, Ownable, Constants {
players[player].n_runs += 1;
if (existing_player) {
// TODO: Emit new run
emit PleyerStrikesAgain(player, players[player].total_rewards, INITIAL_GELD);
emit PlayerStrikesAgain(player, players[player].total_rewards, INITIAL_GELD);
} else {
// Emit event
emit PlayerRegistered(msg.sender, INITIAL_GELD);

View File

@ -148,4 +148,9 @@ contract raid_geldTest is Test {
}
console.log("Total", total);
}
function test_5_last_boss_is_unique(uint256 _randomSeed) public {
uint8[7] memory bosses = RaidGeldUtils.generate_boss_variants(_randomSeed);
vm.assertEq(bosses[6], 6);
}
}