Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class RunFlamand implements Runnable{
- FlamandVert FV = new FlamandVert(100);
- @Override
- public void run() {
- // TODO Auto-generated method stub
- boolean vivant = true;
- long time =0;
- while (vivant) {
- long nb =Math.round(Math.random() * (PoisChiche.PoisChiches.size()-1));
- FV.Attaque(PoisChiche.PoisChiches.get((int) nb));
- if(FV.Pv<=0) vivant=false;
- time= Math.round(5000+ Math.random() * (20000));
- try {
- Thread.sleep(time);
- } catch (InterruptedException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- FlamandVert.FlamandVerts.remove(FV);
- System.out.println("mort du Flamand vert numero " + FV.num);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement