Changed getTopCards to use LinkedHashSet to always return cards in the same order that they are in the library.

This commit is contained in:
Alex Vasile 2022-02-06 10:08:17 -05:00
parent 149c799926
commit 2996b0f76f

View file

@ -168,7 +168,7 @@ public class Library implements Serializable {
}
public Set<Card> getTopCards(Game game, int amount) {
Set<Card> cards = new HashSet<>();
Set<Card> cards = new LinkedHashSet<>();
Iterator<UUID> it = library.iterator();
int count = 0;
while (it.hasNext() && count < amount) {