This site requires JavaScript, please enable it in your browser!
Greenfoot back
Jemy
Jemy wrote ...

2021/2/24

How to call this return type method in actor class.

Jemy Jemy

2021/2/24

#
public int TimeOut(){ int electionTimeout= new int; for(int i=0; i < electionTimeout.length; i++){ electionTimeout=(int)(Greenfoot.getRandomNumber(151)+150); } int min = electionTimeout; for(int i=0;i < electionTimeout.length;i++){ if(electionTimeout < min) min = electionTimeout; } return min; any help will be appreciated
danpost danpost

2021/2/24

#
int timeOut = ((MyWorld)getWorld()).TimeOut();
You need to login to post a reply.