Record MIRV warhead intercepted stats, perf improvements (#1220)

## Description:

- Record MIRV warhead intercepted stats.
- Refactor `nearbyUnits()` to accept a predicate, and combine related
unnecessary `filter()` and `map()` calls.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

---------

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
Co-authored-by: evanpelle <evanpelle@gmail.com>
This commit is contained in:
Scott Anderson
2025-06-19 12:58:27 -07:00
committed by GitHub
co-authored by Scott Anderson evanpelle
parent 3597f7b326
commit 2dad1dc9a6
12 changed files with 89 additions and 78 deletions
+1 -1
View File
@@ -163,7 +163,7 @@ describe("Stats", () => {
});
test("bombIntercept", () => {
stats.bombIntercept(player1, player2, UnitType.MIRVWarhead);
stats.bombIntercept(player1, UnitType.MIRVWarhead, 1);
expect(stats.stats()).toStrictEqual({
client1: { bombs: { mirvw: [0n, 0n, 1n] } },
});