added RumbleTest.java

This commit is contained in:
Illia Soloviov 2024-02-01 16:18:40 +01:00
parent 5c896cd178
commit 6bea41fdbc

22
src/RumbleTest.java Normal file
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();
}
}
}
}