Mana Record and MagicColor
- Dominant language
- Java
- Stars
- 2.7k
- Forks
- 1.1k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 158
Description
Part of #8682
Big Mana Producers can cause Memory Crash
And also some cleanup for using Color Enum
- Mana Produced is a very long String "B B B", it should be refactored into a map `{B => 3}`
- then each Mana Produced by a SpellAbility create a Mana Record. If possible try to reuse existing Records. So it becomes `{Mana => 3}` #10811
- Same with ManaPool, instead of using byte, have it use Color, like `Color => Mana => 3` #10824
- adding 3 times Mana, caused 3 times `updateManaForView` and `new GameEventManaPool`, this is slowing down the system #10812
Guava [Multiset](https://github.com/google/guava/wiki/NewCollectionTypesExplained#multiset) would be nice to hide the `{X => 3}` structure 🤔
Contributor guide
Assessment
This issue has not been assessed yet.