added RumbleTest.java
This commit is contained in:
parent
5c896cd178
commit
6bea41fdbc
22
src/RumbleTest.java
Normal file
22
src/RumbleTest.java
Normal 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…
x
Reference in New Issue
Block a user