@@ -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(); | |||
} | |||
} | |||
} | |||
} |