Search results

  1. fukurou

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

    class InputFilter { // filter out non-relevant input // or filter in relevant data fun filter(ear: String, skin: String, eye: String): String { // override me return "" } fun filter(ear: String): AXKeyValuePair { // override me : key =...
  2. fukurou

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

    class Differ { var powerLevel = 90 private set var difference = 0 private set fun clearPowerLVDifference() { difference = 0 } fun samplePowerLV(pl: Int) { // pl is the current power level difference = pl - powerLevel...
  3. fukurou

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

    class Cycler(var limit: Int) { // cycles through numbers limit to 0 non-stop var mode = 0 private set init { mode = limit } fun cycleCount(): Int { mode-- if (mode < 0) { mode = limit } return mode } fun...
  4. fukurou

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

    class Cron( startTime: String, // triggers true, limit times, after initial time, and every minutes interval // counter resets at initial time, assuming trigger method was run private var minutes // minute interval between triggerings : Int, limit: Int ) : TrGEV3() { private...
  5. fukurou

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

    class TrgTime { var t = "null" var regexUtil = RegexUtil() var pl: PlayGround = PlayGround() private var alarm = true fun setTime(v1: String) { t = regexUtil.extractRegex(enumRegexGrimoire.SimpleTimeStamp, v1) } fun alarm(): Boolean { val now: String...
  6. fukurou

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

    PlayGround class too big to post
  7. fukurou

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

    enum class enumTimes { DATE, DAY, YEAR, HOUR, MINUTES, SECONDS }
  8. fukurou

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

    class AXStrOrDefault { fun getOrDefault(str1: String, default1: String): String { return str1.ifEmpty { default1 } } }
  9. fukurou

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

    class AXStringSplit { // may be used to prepare data before saving or after loading // the advantage is less data fields. for example: {skills: s1_s2_s3} private var spChar = "_" fun setSpChar(spChar: String) { this.spChar = spChar } fun split(s1: String)...
  10. fukurou

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

    class AXStrategy // limit of active strategies (pulled from all available strategies) ( /* this auxiliary module is used to output strategies based on context can be used for battles, and games upon pain/lose use the evolve methode to update to different new active...
  11. fukurou

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

    class Strategy( // bank of all strategies. out of this pool active strategies are pulled var allStrategies: DrawRnd ) { private val activeStrategy // active strategic options : UniqueItemSizeLimitedPriorityQueue = UniqueItemSizeLimitedPriorityQueue() init { //...
  12. fukurou

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

    class AXShoutOut { private var isActive = false var handshake = Responder() fun activate() { // make engage-able isActive = true } fun engage(ear: String): Boolean { if (ear.isEmpty()) { return false } if (isActive) {...
  13. fukurou

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

    class AXPrompt { /* * example use: * * // prompt1 Prompt prompt1 = new Prompt(); prompt1.kv.setKey("fruit"); prompt1.setPrompt("do you prefer an apple, banana or grapes?"); prompt1.setRegex("apple|banana|grapes"); // prompt 2...
  14. fukurou

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

    class Prompt { var regexUtil = RegexUtil() var kv = AXKeyValuePair() var prompt = "" private var regex = "" init { kv.key = "default" } fun process(in1: String): Boolean { kv.value = regexUtil.extractRegex(regex, in1) return...
  15. fukurou

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

    class AXPassword { // code # to open the gate // while gate is open, code can be changed with: code new_number var isOpen = false private set private var maxAttempts = 3 // return remaining login attempts var loginAttempts = maxAttempts private set...
  16. fukurou

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

    public class AXNPC2 extends AXNPC{ public AnnoyedQue annoyedQue = new AnnoyedQue(5); public AXNPC2(int replyStockLim, int outputChance) { super(replyStockLim, outputChance); } public void strLearn(String ear){ // learns inputs containing strings that are...
  17. fukurou

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

    open class AXNPC(replyStockLim: Int, outputChance: Int) { var responder = RefreshQ() var dripper = PercentDripper() var cmdBreaker = AXCmdBreaker("say") init { responder.limit = replyStockLim if (outputChance in 1..100) {...
  18. fukurou

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

    class PercentDripper { private val dr = DrawRnd() private var limis = 35 fun setLimis(limis: Int) { this.limis = limis } fun drip(): Boolean { return dr.getSimpleRNDNum(100) < limis } fun dripPlus(plus: Int): Boolean { return...
  19. fukurou

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

    class AXNeuroSama // the higher the rate the less likely to decorate outputs (private val rate: Int) { private val nyaa = Responder(" heart", " heart", " wink", " heart heart heart") private val rnd = DrawRnd() fun decorate(output: String): String { if...
  20. fukurou

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

    class Responder(vararg replies: String) { // simple random response dispenser private val responses = ArrayList<String>() private val rand = Random() init { Collections.addAll(responses, *replies) } val aResponse: String get() = if (responses.isEmpty())...
Top