Card-Forge / Card-Forge/forge

Move nextId statics into Game methods

Open
#11,260 6 comments 0 reactions 3 assignees Claimed by @tool4ever View on GitHub
Game Mechanics keep
Dominant language
Java
Stars
2.7k
Forks
1.1k
Avg merge
1d 1h
Merged PRs (30d)
158

Description

Move functions like Card::nextId into Game methods:

https://github.com/Card-Forge/forge/blob/e53ed40b202a1208db523d60373da35c34ca5556/forge-game/src/main/java/forge/game/Game.java#L67-L68

with that, the limit isn't global anymore

I don't know yet how to store the ID in Game object
maybe as a `Map`?

Maybe refactor/remove GameEntityCache? it is only used for playerCache?
https://github.com/Card-Forge/forge/blob/e53ed40b202a1208db523d60373da35c34ca5556/forge-game/src/main/java/forge/game/Game.java#L262-L278

it seems GameEntityCache can be replaced by GameEntityViewMap?

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.