public class TrgTolerance extends TrGEV3{
// this boolean gate will return true till depletion or reset()
private int repeats = 0;
private int maxrepeats; //2 recomended
public TrgTolerance(int maxrepeats) {
this.maxrepeats = maxrepeats;
}
public void...
open class TrGEV3 {
// advanced boolean gates with internal logic
// these ease connecting common logic patterns, as triggers
open fun reset() {}
fun input(ear: String, skin: String, eye: String) {}
open fun trigger(): Boolean {
return false
}
}
class AXGamification {
// this auxiliary module can add fun to tasks, skills, and abilities simply by
// tracking their usage, and maximum use count.
var counter = 0
private set
var max = 0
private set
fun resetCount() {
counter = 0
}
fun...
class AXFunnel {
// funnel many inputs to fewer or one input
// allows using command variations in skills
private val dic: MutableMap<String, String>
private var defaultStr: String
init {
dic = HashMap()
defaultStr = "default"
}
fun...
class AXCmdBreaker( // separate command parameter from the command
var conjuration: String
) {
fun extractCmdParam(s1: String): String {
return if (s1.contains(conjuration)) {
s1.replace(conjuration, "").trim { it <= ' ' }
} else ""
}
}
package auxiliary_modules
open class UniqueItemSizeLimitedPriorityQueue : UniqueItemsPriorityQue() {
// items in the queue are unique and do not repeat
// the size of the queue is limited
var limit = 5
override fun add(item: String) {
if (super.size() == limit) {
super.poll()...
class UniqueItemsPriorityQue : LGFIFO<String>() {
// a priority queue without repeating elements
override fun add(item: String) {
if (!super.contains(item)) {
super.add(item)
}
}
override fun peak(): String {
return super.peak() ?: return ""...
open class LGFIFO<T> {
//first in first out queue
var elements = ArrayList<T>()
open fun add(item: T) {
elements.add(item)
}
fun size(): Int {
return elements.size
}
open fun peak(): T? {
return if (size() == 0) {
null
}...
open class LGFIFO<T> {
//first in first out queue
var elements = ArrayList<T>()
open fun add(item: T) {
elements.add(item)
}
fun size(): Int {
return elements.size
}
open fun peak(): T? {
return if (size() == 0) {
null
}...
import livinGrimoire.Algorithm
import java.util.*
// (*)Algorithm Dispensers
class AlgDispenser(vararg algorithms: Algorithm) {
// super class to output an algorithm out of a selection of algorithms
private val algs: ArrayList<Algorithm> = ArrayList<Algorithm>()
private var...
class Brain {
var logicChobit: Chobits
var hardwareChobit: Chobits
var emotion = ""
private set
var bodyInfo = ""
private set
var logicChobitOutput = ""
private set
init {
logicChobit = Chobits()
hardwareChobit = Chobits()...
class Chobits : thinkable() {
protected var dClasses = ArrayList<DiSkillV2>()
var fusion: Fusion
protected set
protected var noiron: Neuron
// use this for telepathic communication between different chobits objects
// several chobits can use the same soul
// this...
class Chobits : thinkable() {
protected var dClasses = ArrayList<DiSkillV2>()
var fusion: Fusion
protected set
protected var noiron: Neuron
// use this for telepathic communication between different chobits objects
// several chobits can use the same soul
// this...