How do I cleanly keep track of the type of various objects implementing a common interface without reflection?
📝
内容提要
In my multiplayer game I keep track of each player's inventory. I have a class for each inventory action that extends the abstract class InventoryItem. I then polymorphically call use() on the...
➡️