refactor: improve stone cooldown update method

This commit is contained in:
punchready 2021-07-25 01:13:40 +02:00
parent 191817100d
commit a86e75014f
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ public class StoneCooldownManager {
* Decreases all cooldowns by one according to a round having passed.
*/
public void update() {
cooldowns.replaceAll((s, v) -> Math.max(0, cooldowns.getOrDefault(s, 0) - 1));
cooldowns.replaceAll((s, v) -> Math.max(0, v - 1));
}
/**