- Programs, Items, etc are just Entities, which store a list of Components. All Entities have a grid position (x, y), a unique ID, a name and a description.
- Programs would have a ProgramComponent and a VisibleComponent, along with either an AIComponent or a PlayerComponent.
- Items would have an ItemComponent, a VisibleComponent, etc.
shared_ptr<ProgramPrototype> pProtoHack(new ProgramPrototype(PROG_HACK, 2, 4, 5)); //"Hack" is just a type/class of program
shared_ptr<ProgramPrototype> pProtoSentinel(new ProgramPrototype(PROG_SENTINEL, 2, 4, 256)); //Same with sentinels
pProtoHack->addCommand(Command("Slice", "Deletes 2 sectors from target"))->setName("Hack")->setDescription("Basic attack program");
pProtoSentinel->addCommand(Command("Cut", "Deletes 2 sectors from target"))->setName("Sentinel")->setDescription("Corporate data defender");
shared_ptr<EntityProgram> pHack1((EntityProgram*) (pProtoHack->createInstance(1))); //Number passed to createInstance() is just an ID for the entity
shared_ptr<EntityProgram> pSent1((EntityProgram*) (pProtoSentinel->createInstance(2)));
pHack1->getImageIndex(); //Because image data is shared, the method retrieves the value from its object's prototype reference