👨‍💻 dev friendship module

development

owly

闇の伝説
Staff member
戦闘 コーダー
Java:
public class MdlFriend extends AbsModule{
    Person pal = new Person();
    private Boolean needsFriend = true;
    private Boolean friendActive = false;
    private void resetFriend() {
        
    }
    private Algorithm requestFriend() {return null;}
    private Algorithm activateFriend() {return null;}
    private Boolean isFriendOffer(String input) {return false;}
    @Override
    public Algorithm handle(String ear, String skin, String eye) {
        // TODO Auto-generated method stub
        return null;
    }
    
}
needs a slimes touch
@fukurou
kuchiypuse no jutsu!
 

fukurou

the supreme coder
ADMIN
Java:
public class Person {
    private String name = "";
    private Boolean active = false;
    private String phone = "";
    private String skill = "";
    private String profession = "";
    private String jutsu = "hadouken";
    // location
    private String email = "";
    private String id = "";
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public Boolean getActive() {
        return active;
    }
    public void setActive(Boolean active) {
        this.active = active;
    }
    public String getPhone() {
        return phone;
    }
    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getSkill() {
        return skill;
    }

    public void setSkill(String skill) {
        this.skill = skill;
    }

    public String getProfession() {
        return profession;
    }

    public void setProfession(String profession) {
        this.profession = profession;
    }

    public String getJutsu() {
        return jutsu;
    }

    public void setJutsu(String jutsu) {
        this.jutsu = jutsu;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public void deleteFriend() {
        name = "";
        active = false;
        phone = "";
        skill = "";
        profession = "";
        jutsu = "hadouken";
        // location
        email = "";
        id = "";
    }
}
 

fukurou

the supreme coder
ADMIN
Java:
package AXJava;

import LivinGrimoire.Algorithm;
import LivinGrimoire.DISkillUtils;
import com.sun.org.apache.xpath.internal.operations.Bool;

public class AXFriend {
    private String myName;
    private String friend_name = "null";
    private Boolean needsFriend = true;
    private DISkillUtils diSkillUtils = new DISkillUtils();
    private TrgTolerance active = new TrgTolerance(10);
    private Boolean friendIsActive = false;

    public AXFriend(String myName) {
        this.myName = myName;
    }

    public void reset(){
        friend_name = "null";
        needsFriend = true;
    }

    public String getFriend_name() {
        return friend_name;
    }

    public Algorithm friendHandShake() {
        return diSkillUtils.simpleVerbatimAlgorithm("friend_request", "i am " + myName);
    }

    public Boolean getFriendIsActive() {
        return friendIsActive;
    }

    public Algorithm handle(String ear, String skin, String eye) {
        friendIsActive = active.trigger();
        if(needsFriend && ear.contains("i am")){
            active.reset();
            needsFriend = false; return friendHandShake();
        }
        if(ear.contains(myName)){active.reset();}
        return null;
    }
}
 

fukurou

the supreme coder
ADMIN
Java:
package AXJava;

import LivinGrimoire.Algorithm;
import LivinGrimoire.DISkillUtils;
import com.sun.org.apache.xpath.internal.operations.Bool;

public class AXFriend {
    private String myName = "chi"; // default name
    private String friend_name = "null";
    private Boolean needsFriend = true;
    private DISkillUtils diSkillUtils = new DISkillUtils();
    private TrgTolerance active = new TrgTolerance(10);
    private Boolean friendIsActive = false;

    public AXFriend(int tolerance) {
        // recommended 11
        active = new TrgTolerance(tolerance);
    }

    public String getMyName() {
        return myName;
    }

    public void setMyName(String myName) {
        // make changeable on 1st day
        this.myName = myName;
    }

    public void reset(){
        // should reset once a month
        friend_name = "null";
        needsFriend = true;
        active.disable();
        friendIsActive = false;
    }

    public String getFriend_name() {
        return friend_name;
    }

    public Algorithm friendHandShake() {
        // engage after reset() or at certain time of day if needsFriend, with snooze
        return diSkillUtils.simpleVerbatimAlgorithm("friend_request", "i am " + myName);
    }

    public Boolean getFriendIsActive() {
        return friendIsActive;
    }

    public Algorithm handle(String ear, String skin, String eye) {
        if(needsFriend && ear.contains("i am ")){
            // register new friend
            active.reset();
            friendIsActive = active.trigger();
            friend_name = ear.replace("i am ", "");
            needsFriend = false;
            return friendHandShake();
        }
        if(ear.contains(myName)){active.reset();}
        friendIsActive = active.trigger();
        return null;
    }
}
 
Top