Moti Barski super


Posts : 496 Join date : 2011-08-02
 | Subject: DIBurper skill Sun 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; } }
 bwahaha _________________ MB over and out  | |
|
Moti Barski super


Posts : 496 Join date : 2011-08-02
 | Subject: Re: DIBurper skill Sun Nov 03, 2019 6:03 pm | |
| you don't know how many and when she will do it _________________ MB over and out  | |
|
kurosen codding


Posts : 291 Join date : 2012-04-17
 | Subject: Re: DIBurper skill Wed Apr 29, 2020 10:31 am | |
| beef up (ver2) outputs random burps - 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 String burpArr[] = { "burp1", "burp2", "burp3" }; 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() { int x2 = randomGenerator.nextInt(3); AbsAlgPart itte = new APSay(1, this.burpArr[x2]); 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; } }
| |
|
kurosen codding


Posts : 291 Join date : 2012-04-17
 | Subject: Re: DIBurper skill Tue May 05, 2020 4:51 am | |
| bug fix update. she burped non stop during the minutes of burp generated, it is fixed. | |
|