Browse Source

added RumbleTest.java

main
Illia Soloviov 3 months ago
parent
commit
6bea41fdbc
1 changed files with 22 additions and 0 deletions
  1. 22
    0
      src/RumbleTest.java

+ 22
- 0
src/RumbleTest.java View File

@@ -0,0 +1,22 @@
public class RumbleTest {
public static void main(String[] args) {
int numberOfBots = 5;

Thread[] botThreads = new Thread[numberOfBots];

for (int i = 0; i < numberOfBots; i++) {
RumbleBot rumbleBot = new RumbleBot(args);

botThreads[i] = new Thread(rumbleBot::run);
botThreads[i].start();
}

for (Thread botThread : botThreads) {
try {
botThread.join();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}

Loading…
Cancel
Save