Figure 7.
Instead of using two dictionaries, it is possible to keep the game object as the Key and value as the amount (as was seen in example inside Related Work), however, this would require to find object type trough separate function in order to group objects according to the ObjectType.

4.1 Storing new objects to the backpack

The storing of new object into the backpack (dictionaries) was simple at the first glance. By default, the Key and new game object would go directly to backPackObjects dictionary. Right after, the same Key and amount of that object would go to backPackObjectAmount dictionary. To put object in the backpack, it was required to check if it is already existing or not. If the type did not exist at all, the new Key value was added to the first dictionary, e.g. Apple_1 (apple of type 1). After, same Key and amount of that object was added to the second dictionary.