@@ -0,0 +1,1240 @@
+package gsg.client;%0A%0Aimport gsg.infrastructure.MessageRegistrator;%0Aimport gsg.threads.IJob;%0Aimport gsg.threads.JobRunnerConfiguration;%0Aimport gsg.threads.JobRunnerData;%0A%0A/**%0A * @author zkejid@gmail.com%0A *         Created: 23.07.15 9:18%0A */%0Apublic class BotLoop implements IJob %7B%0A%09public static final long STEP_TIME = 5000L;%0A%09private static String%5B%5D route = new String%5B%5D%7B%22left%22, %22up%22, %22right%22, %22down%22, %22down%22, %22right%22, %22up%22, %22left%22%7D;%0A%0A%09private int currentStep;%0A%09private String key;%0A%09private MessageRegistrator registrator;%0A%09private long time;%0A%0A%09public BotLoop(String key, MessageRegistrator registrator) %7B%0A%09%09this.key = key;%0A%09%09this.registrator = registrator;%0A%09%09currentStep = -1;%0A%09%09time = -1L;%0A%09%7D%0A%0A%09@Override%0A%09public void doJob(JobRunnerConfiguration configuration, JobRunnerData data) %7B%0A%09%09if (timeHasCome()) %7B%0A%09%09%09time = System.currentTimeMillis() + STEP_TIME;%0A%09%09%09currentStep = (currentStep + 1) %25 route.length;%0A%09%09%09//key should be checked by server. not client.%0A%09%09%09final String line = key + %22 %22 + route%5BcurrentStep%5D;%0A%09%09%09registrator.registerMessage(line);%0A%09%09%09System.out.println(%22client generates action: %22+line);%0A%09%09%7D%0A%09%7D%0A%0A%09private boolean timeHasCome() %7B%0A%09%09final long currentTime = System.currentTimeMillis();%0A%09%09return currentTime %3E= time;%0A%09%7D%0A%7D%0A

Add stub of "more clever" bot