Overwhelming ChatGPT with a lengthy wish? Inventory management
TL;DR: Learned two things today: 1. when you confront ChatGPT with a too complicated request you just get a technical error. 2. ChatGPT is really good at explaining how the code works that it generates, incl. simple to understand code snippets. Now this was underwhelming: Me: Assume I have a class Creature that represents a Creature (a monster, a NPC, a player) in a role playing game. This creature needs to have a bag in which it carries stuff. It also has the following limbs: head, arms, body, feet, and it has two hands. Also I have a class Tool that can be any tool that can be put into a bag, and from the bag moved to a limb or to a hand. A limb and a hand can only hold maximum 1 tool. If I move a tool from bag to limb or hand, and there is a tool there already, the former tool will automatically move to the bag. Can you create code for methods a) to put a tool in the bag b) to take a tool out of the bag and assign it to a limb. If the limb holds another tool, this is put into the...

Kommentare
Kommentar veröffentlichen