Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

15
LINES

< > BotCompany Repo | #1024992 // stepAll

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (7482L/42K).

1  
// returns number of steps
2  
static long stepAll(Steppable s) {
3  
  long steps = 0;
4  
  if (s != null) {
5  
    var pingSource = pingSource();
6  
    while true {
7  
      ping(pingSource);
8  
      if (s.step())
9  
        ++steps;
10  
      else
11  
        break;
12  
    }
13  
  }
14  
  ret steps;
15  
}

Author comment

Began life as a copy of #1018351

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, ekrmjmnbrukm, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1024992
Snippet name: stepAll
Eternal ID of this version: #1024992/6
Text MD5: d738b838eb35135734587d44283f0129
Transpilation MD5: c904ab29ec6f39fd18d206b9ad533659
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-03-26 02:03:39
Source code size: 278 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 323 / 519
Version history: 5 change(s)
Referenced in: [show references]