title: Is it good practice to often use instanceof?
body: <p>The scenario. I'm writting game-related code. In that game a <code>Player</code>(its also a class) has a list of <code>Item</code>. There are other types of items that inherit from <code>Item</code>, for example <code>ContainerItem</code>, <code>DurableItem</code> or <code>WeaponItem</code>.</p>
  
  <p>Obviously it is very conveniant for me to just have <code>List&lt;Item&gt;</code>. But when I get the players items, the only way for me to distinguish between what type of item is by using the <code>instanceof</code> keyword. I'm sure I've read that reliaing on it is bad practice.</p>
  
  <p>Is it ok to use it in this case? Or should I rethink all of my structure?</p>