👨‍💻 dev sensory skills

development

fukurou

the supreme coder
ADMIN
JavaScript:
class Brain {
    constructor() {
        this.logicChobit = new Chobits();
        this.emotion = "";
        this.bodyInfo = "";
        this.logicChobitOutput = "";
        this.hardwareChobit = new Chobits();
        this.ear = new Chobits(); // 120425 upgrade
        this.skin = new Chobits();
        this.eye = new Chobits();

        Brain.imprintSoul(this.logicChobit.getKokoro(), this.hardwareChobit, this.ear, this.skin, this.eye);
    }

    static imprintSoul(kokoro, ...args) {
        args.forEach(arg => {
            arg.setKokoro(kokoro);
        });
    }

    getEmotion() {
        return this.emotion;
    }

    getBodyInfo() {
        return this.bodyInfo;
    }

    getLogicChobitOutput() {
        return this.logicChobitOutput;
    }

    doIt(ear, skin, eye) {
        if (this.bodyInfo) {
            this.logicChobitOutput = this.logicChobit.think(ear, this.bodyInfo, eye);
        } else {
            this.logicChobitOutput = this.logicChobit.think(ear, skin, eye);
        }
        this.emotion = this.logicChobit.getSoulEmotion();
        this.bodyInfo = this.hardwareChobit.think(this.logicChobitOutput, skin, eye);
    }

    addLogicalSkill(skill) {
        this.logicChobit.addSkill(skill);
    }

    addHardwareSkill(skill) {
        this.hardwareChobit.addSkill(skill);
    }

    addEarSkill(skill) {
        this.ear.addSkill(skill);
    }

    addSkinSkill(skill) {
        this.skin.addSkill(skill);
    }

    addEyeSkill(skill) {
        this.eye.addSkill(skill);
    }

    think(ear) {
        if (ear) {
            this.doIt(ear, "", "");
        } else {
            this.doIt(this.ear.think("", "", ""), this.skin.think("", "", ""), this.eye.think("", "", ""));
        }
    }

    think() {
        this.doIt(this.ear.think("", "", ""), this.skin.think("", "", ""), this.eye.think("", "", ""));
    }
}
 

fukurou

the supreme coder
ADMIN
JavaScript:
class Brain {
    constructor() {
        this.logicChobit = new Chobits();
        this.emotion = "";
        this.bodyInfo = "";
        this.logicChobitOutput = "";
        this.hardwareChobit = new Chobits();
        this.hardwareChobit.SetKokoro(this.logicChobit.GetKokoro());
        this.ear = new Chobits(); // 120425 upgrade
        this.ear.SetKokoro(this.logicChobit.GetKokoro());
        this.skin = new Chobits();
        this.skin.SetKokoro(this.logicChobit.GetKokoro());
        this.eye = new Chobits();
        this.eye.SetKokoro(this.logicChobit.GetKokoro());
    }

    get GetEmotion() {
        return this.emotion;
    }

    get GetBodyInfo() {
        return this.bodyInfo;
    }

    get GetLogicChobitOutput() {
        return this.logicChobitOutput;
    }

    DoIt(ear, skin, eye) {
        if (this.bodyInfo) {
            this.logicChobitOutput = this.logicChobit.Think(ear, this.bodyInfo, eye);
        } else {
            this.logicChobitOutput = this.logicChobit.Think(ear, skin, eye);
        }
        this.emotion = this.logicChobit.GetSoulEmotion();
        // Case: Hardware skill wishes to pass info to logical chobit
        this.bodyInfo = this.hardwareChobit.Think(this.logicChobitOutput, skin, eye);
    }

    AddLogicalSkill(skill) {
        this.logicChobit.AddSkill(skill);
    }

    AddHardwareSkill(skill) {
        this.hardwareChobit.AddSkill(skill);
    }
    AddEarSkill(skill) {
        this.ear.AddSkill(skill);
    }
    AddSkinSkill(skill) {
        this.skin.AddSkill(skill);
    }
    AddEyeSkill(skill) {
        this.Eye.AddSkill(skill);
    }
    Think_Default(str1) {
        if (str1.trim() !== "") {
            this.DoIt(str1, "", "");
        } else {
            this.DoIt(this.ear.Think("", "", ""), this.skin.Think("", "", ""), this.eye.Think("", "", ""));
        }
    }

    Think() {
        this.DoIt(this.ear.Think("", "", ""), this.skin.Think("", "", ""), this.eye.Think("", "", ""));
    }
}
 
Top