Modified the hasSpace method because I accidentally missed some methods that change stuff in the provided inventory