battle programming a forum for elite programmers with extreme will power to sharpen theire skills
 
HomeSearchRegisterLog in
Post new topic   Reply to topicShare
 

 DIBurper skill

Go down 
AuthorMessage
Moti Barski
super
super
Moti Barski

Posts : 394
Join date : 2011-08-02

DIBurper skill Empty
PostSubject: DIBurper skill   DIBurper skill EmptySun Nov 03, 2019 5:53 pm

makes the AGI burp, can be applied for belches or other bio sounds

Code:
package chobit;

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

public class DIBurper extends DISkill {
   ArrayList<Integer> minutesToBurp = new ArrayList<Integer>();
   private PlayGround playGround = new PlayGround();
   private Random randomGenerator = new Random();
   private Boolean algToGo = false;
   public DIBurper(Kokoro kokoro) {
      super(kokoro);
      minutesToBurp.clear();
      int randomInt = randomGenerator.nextInt(60) + 1; // how many burps this hour
      for (int i = 0; i < randomInt; i++) {
         randomInt = randomGenerator.nextInt(60) + 1; // burp minute, add x random burps
         if (!minutesToBurp.contains(randomInt)) {
            minutesToBurp.add(randomInt);
         }
      }
   }

   @Override
   public void input(String ear, String skin, String eye) {
      int minutes = playGround.getMinutesAsInt();
      if (minutes == 0) {
         minutesToBurp.clear();
         int randomInt = randomGenerator.nextInt(60) + 1; // how many burps this hour
         for (int i = 0; i < randomInt; i++) {
            randomInt = randomGenerator.nextInt(60) + 1; // burp minute, add x random burps
            if (!minutesToBurp.contains(randomInt)) {
               minutesToBurp.add(randomInt);
            }
         }
      } else {
         if (minutesToBurp.contains(minutes)) {
            algToGo = true;
            this.setSentAlg(true);
         }
      }
   }

   @Override
   public void output(Neuron noiron) {
      if (algToGo) {
         algToGo = false;
         noiron.algParts.add(burp());
      }
   }

   private Algorithm burp() {
      AbsAlgPart itte = new Chi(this.kokoro, this.getClass().getSimpleName(), new APSay(1, "burp"));
      String representation = "burp";
      ArrayList<AbsAlgPart> algParts1 = new ArrayList<>();
      algParts1.add(itte);
      Algorithm algorithm = new Algorithm("burp", representation, algParts1);
      return algorithm;
   }
   @Override
   public Boolean auto() {
      // TODO Auto-generated method stub
      return true;
   }
}

face palm

bwahaha

_________________
MB over and out emp it up
Back to top Go down
Moti Barski
super
super
Moti Barski

Posts : 394
Join date : 2011-08-02

DIBurper skill Empty
PostSubject: Re: DIBurper skill   DIBurper skill EmptySun Nov 03, 2019 6:03 pm

you don't know how many and when she will do it

_________________
MB over and out emp it up
Back to top Go down
 
DIBurper skill
Back to top 
Page 1 of 1

Permissions in this forum:You can reply to topics in this forum
battle programmers alliance :: battle programming alliance :: the LivinGrimoire-
Post new topic   Reply to topicJump to: