the brand new AXL category of auxiliary modules.

owly

闇の伝説
Staff member
戦闘 コーダー
the AXL class prefix stands for AuXiliary modules for Lower Chobits.

basically this means language translation, encryption, decryption and reply decorations.
 

fukurou

the supreme coder
ADMIN
:s55: ah shiiiiieeet here we go again.

Java:
package AXJava;

public class AXLHousing {
    public String decorate(String str1){
        // override me
        return "";
    }
}
 

owly

闇の伝説
Staff member
戦闘 コーダー
now for the hub
I want a cycler, Rnd and mood features to set the decor.

later we will add learnability to it's skill. by we I mean you with me bossing you around :s54:
 

fukurou

the supreme coder
ADMIN
Java:
package AXJava;

import LivinGrimoire.DeepCopier;

import java.util.ArrayList;
import java.util.Random;

public class DrawRnd {
    // draw a random element, than take said element out
    private ArrayList<String> strings = new ArrayList<>();
    private ArrayList<String> stringsSource = new ArrayList<>();
    private Random rand = new Random();
    public DrawRnd(String... values) {
        for (int i = 0; i < values.length; i++) {
            strings.add(values[i]);
            stringsSource.add(values[i]);
        }
    }
    public String draw(){
        if (strings.isEmpty()) {return "";}

        int x = rand.nextInt(strings.size());
        String element = strings.get(x);
        strings.remove(x);
        return element;
    }
    public int getSimpleRNDNum(int bound){
        // return 0->bound-1
        return rand.nextInt(bound);
    }
    private LGTypeConverter tc = new LGTypeConverter();
    public int drawAsInt(){
        if (strings.isEmpty()) {return 0;}
        Random rand = new Random();
        int x = rand.nextInt(strings.size());
        String element = strings.get(x);
        strings.remove(x);
        return tc.convertToInt(element);
    }
    public void reset(){
        DeepCopier dc = new DeepCopier();
        strings = dc.copyList(stringsSource);
    }
}
 

fukurou

the supreme coder
ADMIN
Java:
package AXJava;

import LivinGrimoire.Algorithm;

import java.util.ArrayList;

public class AXLHub {
    // hubs many reply decorators, language translators, encriptors and other string modifiers
    // decorate(str) to decorate string using the active string decorator
    private Cycler cycler;
    private DrawRnd drawRnd = new DrawRnd();
    private int size = 0;
    private ArrayList<AXLHousing> nyaa = new ArrayList<AXLHousing>();
    private int activeNyaa = 0;
    public AXLHub(AXLHousing...nyaa) {
        for (AXLHousing temp : nyaa)
        {
            this.nyaa.add(temp);
        }
        size = this.nyaa.size();
        cycler = new Cycler(size);
    }
    public String decorate(String str1){
        return nyaa.get(activeNyaa).decorate(str1);
    }
    public void cycleDecoration(){
        activeNyaa = cycler.cycleCount();
    }
    public void randomizeDecoration(){
        activeNyaa = drawRnd.getSimpleRNDNum(size);
    }
    public void modeDecoration(int mode){
        if(mode < -1){return;}
        if(mode >= nyaa.size()){return;}
        activeNyaa = mode;
    }
}
 

fukurou

the supreme coder
ADMIN
Java:
package AXJava;

public class AXLNeuroSama extends AXLHousing{
    private AXNeuroSama nyaa = new AXNeuroSama(3);

    @Override
    public String decorate(String str1) {
        return this.nyaa.decorate(str1);
    }
}
 
Top