BotGame.java 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742
  1. package GPN;
  2. import org.apache.logging.log4j.Level;
  3. import org.apache.logging.log4j.LogManager;
  4. import org.apache.logging.log4j.Logger;
  5. import org.apache.logging.log4j.core.LoggerContext;
  6. import org.apache.logging.log4j.core.config.LoggerConfig;
  7. import javax.swing.*;
  8. import java.io.*;
  9. import java.net.InetAddress;
  10. import java.net.InetSocketAddress;
  11. import java.net.Socket;
  12. import java.net.SocketAddress;
  13. import java.util.LinkedList;
  14. import java.util.Queue;
  15. import java.util.concurrent.ConcurrentLinkedQueue;
  16. public class BotGame {
  17. private static boolean respawn = true;
  18. private boolean kill = false;
  19. private boolean switchItharder = false;
  20. private Queue<String> returnMsgs = new ConcurrentLinkedQueue<>();
  21. Object syncer = new Object();
  22. static Logger l = LogManager.getLogger();
  23. private int[] []board = new int[1][1];
  24. int[][] boards;
  25. int[][] boardFF;
  26. int ticksSinceStart = 0;
  27. int[][] tickets = null;
  28. boolean danger = false;
  29. private int cx=0,cy=0,cw=1,ch=1;
  30. private String playerid;
  31. int playercount = 0;
  32. boolean[][] headBuffer;
  33. int lastDir = 0;
  34. String debugdir = " ";
  35. boolean gaming = false;
  36. boolean switcheroo=false;
  37. public static void main(String[] args) {
  38. setupLogging(true,2);
  39. l.info("shizzlemork");
  40. while(true)
  41. {
  42. try{
  43. l.info("LOOP, spawning new bot");
  44. new BotGame().game();
  45. }
  46. catch (Error e){l.error(e);} //H4x
  47. catch (Exception e){l.error(e);} //H4x
  48. }
  49. }
  50. int lastcase=-1;
  51. private int boardFF(int x, int y, int id)
  52. {
  53. int cni = y-1;
  54. if(cni==-1)
  55. cni=ch-1;
  56. int csi=(y+1)%ch;
  57. int cwi = x-1;
  58. if(cwi==-1)
  59. cwi=cw-1;
  60. int cei=(x+1)%cw;
  61. return boardFF(x,y,id,0);
  62. }
  63. Queue<int[]> FFQueue = new LinkedList<>();
  64. private int boardFF(int x, int y,int id,int g)
  65. {
  66. FFQueue.add(new int[]{x,y,g});
  67. return boardFF(id);
  68. }
  69. int heads_touched = 0;
  70. private int boardFF(int id)
  71. {
  72. int rv_r=0;
  73. while(!FFQueue.isEmpty())
  74. {
  75. int rv=0;
  76. int[] ffq = FFQueue.remove();
  77. int x=ffq[0];
  78. int y=ffq[1];
  79. int g=ffq[2];
  80. if(boardFF[y][x]!=0)
  81. {
  82. if(boardFF[y][x]>0&&boardFF[y][x]!=id&&g==0)
  83. {
  84. l.info("1337#d");
  85. rv_r += -1337;
  86. continue;
  87. }
  88. rv_r+=0;
  89. continue;
  90. }
  91. rv = 2 ;
  92. int cni = y-1;
  93. if(cni==-1)
  94. cni=ch-1;
  95. int csi=(y+1)%ch;
  96. int cwi = x-1;
  97. if(cwi==-1)
  98. cwi=cw-1;
  99. int cei=(x+1)%cw;
  100. if(headBuffer[y][cwi]||headBuffer[y][cei]||headBuffer[csi][x]||headBuffer[cni][x])
  101. {
  102. rv_r+= g==0?1:0;
  103. heads_touched++;
  104. continue;
  105. }
  106. boardFF[y][x]=id;
  107. if(g<15) {
  108. FFQueue.add(new int[]{x, cni, g + 1});
  109. FFQueue.add(new int[]{x, csi, g + 1});
  110. FFQueue.add(new int[]{cwi, y, g + 1});
  111. FFQueue.add(new int[]{cei, y, g + 1});
  112. }
  113. rv_r+=rv;
  114. }
  115. return rv_r;
  116. }
  117. static void setupLogging(boolean verbose,int verbosityLevel)
  118. {
  119. System.setProperty("java.util.logging.manager", "org.apache.logging.log4j.jul.LogManager"); //HACK to catch java.util.logging loggers
  120. l=LogManager.getLogger();
  121. LoggerContext cx = (LoggerContext) LogManager.getContext(false);
  122. org.apache.logging.log4j.core.config.Configuration config = cx.getConfiguration();
  123. LoggerConfig loggerConfig = config.getLoggerConfig(LogManager.ROOT_LOGGER_NAME);
  124. LoggerConfig vlcj = config.getLoggerConfig("uk.co.caprica.vlcj");
  125. LoggerConfig externalloggerConfig = config.getLoggerConfig("External");
  126. LoggerConfig trueVFSlloggerConfig = config.getLoggerConfig("net.java");
  127. if (verbose)
  128. {
  129. loggerConfig.setLevel(Level.TRACE);
  130. if(verbosityLevel>1)
  131. {
  132. vlcj.setLevel(Level.TRACE);
  133. externalloggerConfig.setLevel(Level.TRACE);
  134. trueVFSlloggerConfig.setLevel(Level.TRACE);
  135. }
  136. else
  137. {
  138. vlcj.setLevel(Level.INFO);
  139. externalloggerConfig.setLevel(Level.INFO);
  140. trueVFSlloggerConfig.setLevel(Level.INFO);
  141. }
  142. }
  143. else
  144. {
  145. loggerConfig.setLevel(Level.INFO);
  146. externalloggerConfig.setLevel(Level.INFO);
  147. trueVFSlloggerConfig.setLevel(Level.INFO);
  148. }
  149. cx.updateLoggers();
  150. }
  151. public void game(){
  152. if(System.getProperties().containsKey("botdebug"))
  153. {
  154. returnMsgs.add("join|Red5-devel|mösenpilze-8=====D-fdewcugeww");
  155. }
  156. else
  157. {
  158. returnMsgs.add("join|Red5|mösenpilze-8=====D-fdewcugewgw");
  159. }
  160. try {
  161. SocketAddress scka=new InetSocketAddress(InetAddress.getByName("gpn-tron.duckdns.org"), 4000);
  162. Socket sck = new Socket();
  163. sck.connect(scka,1000);
  164. BufferedReader r = new BufferedReader(new InputStreamReader(sck.getInputStream()));
  165. PrintStream out = new PrintStream(sck.getOutputStream(),true,"UTF-8");
  166. String jm = returnMsgs.poll();
  167. System.out.print(jm+'\n');
  168. out.print(jm+'\n');
  169. out.flush();
  170. //Thread t = new Thread(()->{
  171. while(sck.isConnected())
  172. {
  173. if(sck.isClosed())
  174. {
  175. return;
  176. }
  177. if(kill)
  178. {
  179. return;
  180. }
  181. //l.trace("Munching ahead...");
  182. String request = "";
  183. try {
  184. String ln = r.readLine();
  185. //if(gaming)
  186. // l.trace("packet line = "+ln);
  187. if(ln!=null)
  188. {
  189. if(ln.contains("message"))
  190. {
  191. continue;
  192. }
  193. if(ln.contains("lose"))
  194. {
  195. if(boards==null)
  196. {
  197. l.info("Boards nulled?");
  198. kill=true;
  199. respawn=true;
  200. }
  201. String boardview = "\nDumping Core....\nDone:\n";
  202. for(int i=0;i<ch;i++)
  203. {
  204. String secondaryline = "";
  205. for(int j=0;j<cw;j++)
  206. {
  207. boolean self =false;
  208. if(i==cy&&j==cx)
  209. {
  210. self=true;
  211. boardview+="XXXX";
  212. }
  213. String number ="000"+boards[i][j]+"|";
  214. String ticket = "000"+tickets[i][j]+"|";
  215. String hbfr = headBuffer[i][j]?"#":"_";
  216. if(self)
  217. {
  218. hbfr=debugdir;
  219. }
  220. boardview+=hbfr+
  221. number.substring(number.length()-4,number.length());
  222. secondaryline+=ticket.substring(ticket.length()-5,ticket.length());
  223. }
  224. boardview+="\n"+secondaryline+"\n";
  225. }l.info("LOSER!!!1111elf");
  226. l.info(boardview+"\nEnd of Dump");
  227. gaming=false;
  228. }
  229. if(ln.contains("game"))
  230. {
  231. gaming=true;
  232. ticksSinceStart =0;
  233. lastcase=-1;
  234. l.info(ln);
  235. String[] ls = ln.split("\\|");
  236. int w = Integer.valueOf(ls[1]);
  237. int h = Integer.valueOf(ls[2]);
  238. board = new int[w][h];
  239. cw=w;ch=h;
  240. playerid=ls[3];
  241. boards=new int[h][w];
  242. boardFF=new int[h][w];
  243. headBuffer = new boolean[h][w];
  244. out.print("chat|Red 5 standing by"+'\n');
  245. l.info("R5SB");
  246. out.flush();
  247. tickets = new int[h][w];
  248. }
  249. if(ln.contains("pos")&&gaming)
  250. {
  251. if(playercount==0)
  252. {
  253. headBuffer = new boolean[ch][cw];
  254. }
  255. playercount++;
  256. String[] ls = ln.split("\\|");
  257. int w = Integer.valueOf(ls[2]);
  258. int h = Integer.valueOf(ls[3]);
  259. if(ls[1].equals(playerid))
  260. {
  261. l.info("Self");
  262. cx=w;cy=h;
  263. int cni = cy-1;
  264. if(cni==-1)
  265. cni=ch-1;
  266. int csi=(cy+1)%ch;
  267. int cwi = cx-1;
  268. if(cwi==-1)
  269. cwi=cw-1;
  270. int cei=(cx+1)%cw;
  271. int c2ni = cni-1;
  272. if(c2ni==-1)
  273. c2ni=ch-1;
  274. int c2si=(csi+1)%ch;
  275. int c2wi = cwi-1;
  276. if(c2wi==-1)
  277. c2wi=cw-1;
  278. int c2ei=(cei+1)%cw;
  279. if(!(System.getProperties().containsKey("botdebug")))
  280. {
  281. boardFF[cni][cwi] = -1;
  282. boardFF[cni][cei] = -1;
  283. boardFF[csi][cwi] = -1;
  284. boardFF[csi][cei] = -1;
  285. }
  286. /*
  287. boardFF[c2ni][c2wi]=-1;
  288. boardFF[c2ni][c2ei]=-1;
  289. boardFF[c2si][c2wi]=-1;
  290. boardFF[c2si][c2ei]=-1;*/
  291. tickets[h][w]= ticksSinceStart;
  292. }
  293. else
  294. {
  295. headBuffer[h][w]=true;
  296. }
  297. boards[h][w]=Integer.valueOf(ls[1])+1;
  298. }
  299. if(ln.contains("error"))
  300. {
  301. l.error("ERROR_SUS");
  302. l.error(ln);
  303. }
  304. if(ln.contains("die"))
  305. {
  306. l.info(ln);
  307. String[] lns = ln.split("\\|");
  308. for(int k=1;k<lns.length;k++)
  309. {
  310. int death = Integer.valueOf(lns[k])+1;
  311. l.info("wiping"+death);
  312. for(int i=0;i<ch;i++) {
  313. for (int j = 0; j < cw; j++) {
  314. if(boards[i][j]==death)
  315. {
  316. boards[i][j]=0;
  317. tickets[i][j]=-ticksSinceStart;
  318. }
  319. }
  320. }
  321. }
  322. }
  323. if(ln.contains("tick")&&gaming) {
  324. heads_touched=0;
  325. String boardview = "";
  326. for(int i=0;i<ch;i++)
  327. {
  328. for(int j=0;j<cw;j++)
  329. {
  330. int cni = i-1;
  331. if(cni==-1)
  332. cni=ch-1;
  333. int csi=(i+1)%ch;
  334. int cwi = j-1;
  335. if(cwi==-1)
  336. cwi=cw-1;
  337. int cei=(j+1)%cw;
  338. board[i][j]=0;
  339. board[i][j]+=(boards[i][j]!=0)?10:0;//||(boards[cni][j]!=0&&boards[csi][j]!=0)||(boards[i][cwi]!=0&&boards[j][cei]!=0));
  340. boardFF[i][j]=(boards[i][j]!=0)?-1:0;//||(boards[cni][j]!=0&&boards[csi][j]!=0)||(boards[i][cwi]!=0&&boards[j][cei]!=0));
  341. if(j==cx&&i==cy)
  342. {
  343. //boardview+="X";
  344. }
  345. //boardview+=boardFF[i][j]+";"+boards[i][j]+"|";
  346. }
  347. //boardview+="\n";
  348. }
  349. int cn = cy-1;
  350. if(cn==-1)
  351. cn=ch-1;
  352. int cs=(cy+1)%ch;
  353. int cw_ = cx-1;
  354. if(cw_==-1)
  355. cw_=cw-1;
  356. int ce=(cx+1)%cw;
  357. boolean randomDone = false;
  358. String direction = "up";
  359. // AAAAAAA
  360. //l.info("\n"+boardview);
  361. if(board[cn][cx]>9&&board[cs][cx]>9&&board[cy][ce]>9&&board[cy][cw_]>9)
  362. {
  363. l.info("giving up?");
  364. randomDone=true;
  365. lastcase=3;
  366. }
  367. int west=0,east=0,south=0,north=0;
  368. if(ticksSinceStart >0) {
  369. if(ticksSinceStart <0)
  370. {east = boardFF(ce, cy,1);
  371. west = boardFF(cw_, cy,2);
  372. north = boardFF(cx, cn,3);
  373. south = boardFF(cx, cs,4);
  374. }
  375. else
  376. {
  377. //int rnd = (int) (Math.random()*6);
  378. //int rnd=(fuck/13)%4;
  379. int rnd=lastDir;
  380. if(ticksSinceStart %100==0) returnMsgs.add("chat|Stay on Target! Stay on Target!");
  381. if(ticksSinceStart %100==50) returnMsgs.add("chat|Red 5 standing by");
  382. if(ticksSinceStart %100==75) returnMsgs.add("chat|rm -rf ~/botarmee*");
  383. String lmaa = returnMsgs.poll();
  384. l.info("22MP="+lmaa);
  385. out.print(lmaa+'\n');
  386. out.flush();
  387. l.info("lastdir"+lastDir);
  388. //boolean switcheroo = new File("/home/lh/switch").exists();
  389. switch(rnd)
  390. {
  391. case 3://prev=east
  392. if(switcheroo) south = boardFF(cx, cs,1);
  393. else north = boardFF(cx, cn,2);
  394. east = boardFF(ce, cy,3);
  395. if (switcheroo) north = boardFF(cx, cn,2);
  396. else south = boardFF(cx, cs,1);
  397. west = boardFF(cw_, cy,4);
  398. l.info("lnesw"+lastDir+";"+north+";"+east+";"+south+";"+west);
  399. break;
  400. case 1: //prev=west
  401. if(switcheroo) north = boardFF(cx, cn,1);
  402. else south = boardFF(cx, cs,2);
  403. west = boardFF(cw_, cy,3);
  404. if (switcheroo) south = boardFF(cx, cs,2);
  405. else north = boardFF(cx, cn,1);
  406. east = boardFF(ce, cy,4);
  407. break;
  408. case 2://prev=down
  409. if(switcheroo)west = boardFF(cw_, cy,1);
  410. else east = boardFF(ce, cy,2);
  411. south = boardFF(cx, cs,3);
  412. if(switcheroo)east = boardFF(ce, cy,2);
  413. else west = boardFF(cw_, cy,1);
  414. north = boardFF(cx, cn, 4);
  415. break;
  416. case 0: //prev=up
  417. if(switcheroo)east = boardFF(ce, cy,1);
  418. else west = boardFF(cw_, cy,2);
  419. north = boardFF(cx, cn,3);
  420. if(switcheroo) west =boardFF(cw_, cy,2);
  421. else east =boardFF(ce, cy,1);
  422. south = boardFF(cx, cs,4);
  423. break;
  424. }
  425. }
  426. }
  427. else{
  428. if(ticksSinceStart <30) {
  429. south = boardFF(cx, cs,1);
  430. north = boardFF(cx, cn,2);
  431. west = boardFF(cw_, cy,3);
  432. east = boardFF(ce, cy,4);
  433. }
  434. }
  435. ticksSinceStart++;
  436. int highest=Math.max(Math.max(north,south),Math.max(west,east));
  437. l.info("hnesw"+highest+";"+north+";"+east+";"+south+";"+west);
  438. if(
  439. (
  440. (ticksSinceStart <20
  441. ||(ticksSinceStart >40
  442. && ticksSinceStart <60)
  443. ||(500+ ticksSinceStart -330)%500<30)
  444. ||(playercount<3&&(ticksSinceStart %100<50)
  445. )
  446. )&&highest>1000)
  447. {
  448. l.info(ticksSinceStart <20);
  449. l.info(((500+ ticksSinceStart -330)%500)<30);
  450. l.info("remappingparty");
  451. if(east==-1337)
  452. east=highest;
  453. if(west==-1337)
  454. west=highest;
  455. if(south==-1337)
  456. south=highest;
  457. if(north==-1337)
  458. north=highest;
  459. }
  460. else
  461. {
  462. {
  463. if(east==-1337)
  464. east=0;
  465. if(west==-1337)
  466. west=0;
  467. if(south==-1337)
  468. south=0;
  469. if(north==-1337)
  470. north=0;
  471. }
  472. }
  473. if((highest<((cw*ch)/(playercount+1))||playercount<3))
  474. {
  475. l.info("Switcheroo zone reached");
  476. if(ticksSinceStart %10==0)
  477. {
  478. l.info("chkFlick");
  479. if(heads_touched<2&&playercount>5&&ticksSinceStart>150)
  480. {
  481. l.info("headcount:"+heads_touched);
  482. switcheroo=!switcheroo;
  483. }
  484. if((ticksSinceStart /10)%3<2)
  485. {
  486. l.info("flick");
  487. switcheroo=!switcheroo;
  488. }
  489. }
  490. }
  491. l.info("switcheroo="+switcheroo);
  492. l.info("fnesw"+ ticksSinceStart +";"+north+";"+east+";"+south+";"+west);
  493. int rnd=(int)(Math.random()*4);
  494. if(ticksSinceStart %300<25&& ticksSinceStart >15)
  495. {
  496. rnd=0;
  497. }
  498. int lastchoice=-1;
  499. int treshold=1;
  500. while(!randomDone)
  501. {
  502. //rnd = (int) (Math.random()*4);
  503. //rnd=lastchoice;
  504. /*lastchoice+=1;
  505. if(lastchoice>3)
  506. {
  507. lastchoice=0;
  508. treshold++;
  509. }
  510. if(treshold>3)
  511. {
  512. }*/
  513. //l.info("rnd="+rnd+"lastcse="+lastcase);
  514. /*if(rnd==lastcase)
  515. {
  516. l.info("reroll");
  517. continue;
  518. }*/
  519. if(highest<10)
  520. {
  521. returnMsgs.add("chat|godmayFUCKingdamnit=="+";"+north+";"+east+";"+south+";"+west);
  522. l.info("GMFDI");
  523. out.print(returnMsgs.poll()+'\n');
  524. out.flush();
  525. }
  526. switch(rnd)
  527. {
  528. case 1:
  529. //if((board[cy][cw_]<treshold))
  530. if(west==highest)
  531. {
  532. lastDir=1;
  533. debugdir="<";
  534. direction="left";
  535. randomDone=true;
  536. lastcase=3;}
  537. break;
  538. case 3:
  539. //if((board[cy][ce]<treshold))
  540. if(east==highest)
  541. {
  542. lastDir=3;
  543. direction="right";
  544. randomDone=true;
  545. debugdir=">";
  546. lastcase=1;
  547. }
  548. break;
  549. case 0:
  550. lastDir=0;
  551. //if(((board[cn][cx]*2)<treshold)){
  552. if(north==highest){
  553. debugdir="^";
  554. direction="up";
  555. randomDone=true;
  556. lastcase=2;}
  557. break;
  558. case 2:
  559. lastDir=2;
  560. //if((board[cs][cx]<treshold))
  561. if(south==highest)
  562. {
  563. debugdir="V";
  564. direction="down";
  565. randomDone=true;
  566. lastcase=0;}
  567. break;
  568. }
  569. rnd=(rnd+1)%4;
  570. }
  571. //headBuffer = new boolean[ch][cw];
  572. l.trace("pc="+playercount);
  573. playercount=0;
  574. out.print("move|"+direction+'\n');
  575. l.info(">>>move|"+direction+'\n');
  576. out.flush();
  577. }
  578. }
  579. else
  580. {
  581. l.info("SCK:");
  582. l.info(sck.isClosed());
  583. l.info(sck.isConnected());
  584. l.info(sck.isInputShutdown());
  585. kill=true;
  586. respawn=true;
  587. throw new Error();
  588. }
  589. } catch (IOException ex) {
  590. //l.warn("NETZAP");
  591. return;
  592. //break;
  593. }
  594. //l.trace(request);
  595. }
  596. //});
  597. //t.setName("InputCruncher");
  598. //t.start();
  599. /*Thread t2 = new Thread(()->{
  600. //System.out.println("Gefangen!");
  601. try {
  602. while(sck.isConnected())
  603. {
  604. if(kill)
  605. {
  606. l.info("time to say goodbye");
  607. return;
  608. }
  609. synchronized(syncer)
  610. {
  611. mösenpilze++;
  612. if(mösenpilze>300000000)
  613. {
  614. mösenpilze=0;
  615. l.info("WHY THZE FUDGE");
  616. }
  617. while(!returnMsgs.isEmpty())
  618. {
  619. mösenpilze=0;
  620. submöse++;
  621. if(submöse>3)
  622. {
  623. möseon=true;
  624. }
  625. // FUCK YOU DUMB IDIOT; NO THREAD.SLEEP() HERE!!!!!11!!11elf
  626. String returnMsg = returnMsgs.poll();
  627. if(returnMsg == null)
  628. {
  629. submöse2++;
  630. if(submöse2<3)
  631. {
  632. l.trace("22MP");
  633. }
  634. else
  635. {
  636. if(submöse2==4)
  637. {
  638. l.trace("Hodentasche");
  639. submöse2=0;
  640. returnMsgs = new ConcurrentLinkedQueue<>();
  641. //kill=true;
  642. //respawn=true;
  643. //sck.close();
  644. //return;
  645. }
  646. }
  647. continue;
  648. } out.print(returnMsg+'\n');
  649. out.flush();
  650. l.trace("PKT="+returnMsg);
  651. out.print(returnMsg+'\n');
  652. out.flush();
  653. }
  654. //l.trace("end of MessageStream");
  655. }
  656. }
  657. }
  658. catch (Exception e)
  659. {
  660. l.error("ZZMP");
  661. l.error(e);
  662. System.exit(1337);
  663. }
  664. System.out.println("Flucht ist zwecklos");
  665. System.exit(1337);
  666. });
  667. t2.setName("OutputCruncher");
  668. t2.start();*/
  669. l.info("asdfqwxix");
  670. }
  671. catch (IOException ex)
  672. {
  673. respawn=true;
  674. ex.printStackTrace();
  675. l.error(" Unable to connect to Host. Aborting now");
  676. try {
  677. Thread.sleep(199);
  678. } catch (InterruptedException e) {
  679. throw new RuntimeException(e);
  680. }
  681. }
  682. }
  683. //int submöse2=0;
  684. //int submöse=0;
  685. //boolean möseon=false;
  686. //long mösenpilze = 0;
  687. }