Card-Forge / Card-Forge/forge

Refactoring counted Map<T, Integer> as Multiset<T>

Open
#10,886 1 comment 0 reactions 1 assignee Assigned to @Hanmac View on GitHub
Game Mechanics keep
Dominant language
Java
Stars
2.7k
Forks
1.1k
Avg merge
1d 1h
Merged PRs (30d)
163

Description

Guava Multiset already handles adding/removing Amount for us, so we should not need to do that ourselves.

Big uses of `, Integer>` i have seen and could be changed:
* `ItemPool implements Iterable>` (and it uses `Map.Entry`)
* `Map` in GameEntity (and Subclasses) #11121
* `ActivationTable` is a `Table, List>`, but the Value part should be a `Multiset` instead #10998

What probably shouldn't be changed:
* Damage noticed on a Card using `Map`

undecided:
* `TokenCreateTable extends ForwardingTable`
in the end, the prototype is copied and giving a new ID each

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.