C
C
CatNorrius2022-04-13 15:26:33
C++ / C#
CatNorrius, 2022-04-13 15:26:33

Slots and how to generate items in them?

Good afternoon.
I'm just starting to learn this path, so don't blame me if the question seems simple/incorrectly formulated.
There are half a hundred slots in which you can put items (1 slot - 1 item) and the item will be located in the center of the slot.
You need to make a generator that will place an item in an empty slot (if there is one).
What is the best way to implement this feature?
I already thought about an array with the coordinates of the slots, and about assigning an ID to each slot and a check for the presence of an object inside. I don't know yet how to implement it.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question