#Method that checks if next player in array is null or no
8 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @shell ore! Please use
/closeor theClose Postbutton above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
for(int i = currentplayer; i < this.players.length + 1; i++){
if(this.players[i+1] != null){
currentplayer = (currentplayer + 1) % this.players.length;
}
i = i % this.players.length;
}