When testing ahead of time, if moving an item is possible at all, canPlaceItemInInventory should be checked too. As my pre-check already iterates over the inventory, I'm going to feed the addItem method with the inventory slot index, that was found there, toavoid a second iteration over the same inventory.