battle programmers alliance
Would you like to react to this message? Create an account in a few clicks or log in to continue.

battle programmers allianceLog in

the LivinGrimoire Artificial General Intelligence software design pattern forum

descriptionjava main code Emptyjava main code

more_horiz

Code:

Brain b1 = new Brain();
b1.addLogicalSkill(new DiHelloWorld());
b1.addHardwareSkill(new DiSysOut());
b1.doIt("hello", "", "");

descriptionjava main code EmptyRe: java main code

more_horiz
also main code shold be more like:

Code:

Brain* b1 = new Brain();
b1->addLogicalSkill(new DiHelloWorld());
b1->addHardwareSkill(new DiSysOut());
b1->doIt("hello", "", "");


the whole point of the LivinGrimoire is adding a skill with only one line of code
not 2 lines:

Code:

    Brain b1;
    unique_ptr< DiHelloWorld> dihello = make_unique< DiHelloWorld>();
    unique_ptr< DiSysOut> disys = make_unique< DiSysOut>();

    b1.addLogicalSkill(dihello.get());
    b1.addHardwareSkill(disys.get());


I also don't understand the .get() thing, I don't like it.
privacy_tip Permissions in this forum:
You cannot reply to topics in this forum
power_settings_newLogin to reply