Search results

  1. fukurou

    πŸ‘¨β€πŸ’» dev porting Auxiliary modules Java->kotlin

    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 "" } }
  2. fukurou

    πŸ‘¨β€πŸ’» dev porting Auxiliary modules Java->kotlin

    class AnnoyedQue(queLim: Int) { private val q1 = RefreshQ() private val q2 = RefreshQ() init { q1.limit = queLim q2.limit = queLim } fun learn(ear: String) { if (q1.contains(ear)) { q2.add(ear) return }...
  3. fukurou

    πŸ‘¨β€πŸ’» dev porting Auxiliary modules Java->kotlin

    class RefreshQ : UniqueItemSizeLimitedPriorityQueue() { override fun removeItem(item: String) { super.elements.remove(item) } override fun add(item: String) { // FILO if (super.contains(item)) { removeItem(item) } super.add(item) } }
  4. fukurou

    πŸ‘¨β€πŸ’» dev porting Auxiliary modules Java->kotlin

    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()...
  5. fukurou

    πŸ‘¨β€πŸ’» dev porting Auxiliary modules Java->kotlin

    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 ""...
  6. fukurou

    πŸ‘¨β€πŸ’» dev porting Auxiliary modules Java->kotlin

    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 }...
  7. fukurou

    πŸ‘¨β€πŸ’» dev porting Auxiliary modules Java->kotlin

    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 }...
  8. fukurou

    πŸ‘¨β€πŸ’» dev porting Auxiliary modules Java->kotlin

    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...
  9. fukurou

    [MEDIA]

  10. fukurou

    πŸ‘¨β€πŸ’» dev Java->Kotlin port

    class DiSysOut : DiSkillV2() { override fun input(ear: String, skin: String, eye: String) { if (!ear.isEmpty() and !ear.contains("#")) { println(ear) } } }
  11. fukurou

    πŸ‘¨β€πŸ’» dev Java->Kotlin port

    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()...
  12. fukurou

    πŸ‘¨β€πŸ’» dev Java->Kotlin port

    hello world :s72:
  13. fukurou

    πŸ‘¨β€πŸ’» dev Java->Kotlin port

    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...
  14. fukurou

    πŸ‘¨β€πŸ’» dev Java->Kotlin port

    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...
  15. fukurou

    πŸ‘¨β€πŸ’» dev Java->Kotlin port

    open class thinkable { open fun think(ear: String, skin: String, eye: String): String { // override me return "" } }
  16. fukurou

    πŸ‘¨β€πŸ’» dev Java->Kotlin port

    class Fusion { var emot = "" private set private var result = "" private val ceraArr = arrayOfNulls<Cerabellum>(5) init { for (i in 0..4) { ceraArr[i] = Cerabellum() } } fun loadAlgs(neuron: Neuron) { for (i in 1..5) {...
  17. fukurou

    πŸ‘¨β€πŸ’» dev Java->Kotlin port

    class Cerabellum { // runs an algorithm private var fin = 0 var at = 0 private set private var incrementAt = false fun advanceInAlg() { if (incrementAt) { incrementAt = false at++ if (at == fin) { isActive =...
  18. fukurou

    πŸ‘¨β€πŸ’» dev Java->Kotlin port

    class DiHelloWorld // hello world skill for testing purposes : DiSkillV2() { override fun input(ear: String, skin: String, eye: String) { when (ear) { "hello" -> super.setVerbatimAlg(4, "hello world") // 1->5 1 is the highest algorithm priority } } }
  19. fukurou

    πŸ‘¨β€πŸ’» dev Java->Kotlin port

    open class DiSkillV2 { protected var kokoro = Kokoro(AbsDictionaryDB()) // consciousness, shallow ref class to enable interskill communications protected var diSkillUtils = DISkillUtils() protected var outAlg: Algorithm? = null // skills output protected var outpAlgPriority = -1 //...
  20. fukurou

    πŸ‘¨β€πŸ’» dev Java->Kotlin port

    class DISkillUtils { // alg part based algorithm building methods // var args param fun algBuilder(vararg algParts: Mutatable): Algorithm { // returns an algorithm built with the algPart varargs val algParts1 = ArrayList<Mutatable>() for (i in algParts.indices) {...
Top