|
@@ -81,6 +81,7 @@ public class BotGame {
|
|
|
FFQueue.add(new int[]{x,y,g});
|
|
|
return boardFF(id);
|
|
|
}
|
|
|
+ int hackfuck = 0;
|
|
|
int heads_touched = 0;
|
|
|
private int boardFF(int id)
|
|
|
{
|
|
@@ -92,6 +93,10 @@ public class BotGame {
|
|
|
int x=ffq[0];
|
|
|
int y=ffq[1];
|
|
|
int g=ffq[2];
|
|
|
+ /*if(boardFF[y][x]==1&&g==0)
|
|
|
+ {
|
|
|
+ boardFF[y][x]=0; //hack fuckfix für raceconditions
|
|
|
+ }*/
|
|
|
if(boardFF[y][x]!=0)
|
|
|
{
|
|
|
if(boardFF[y][x]>0&&boardFF[y][x]!=id&&g==0)
|
|
@@ -116,11 +121,14 @@ public class BotGame {
|
|
|
int cei=(x+1)%cw;
|
|
|
if(headBuffer[y][cwi]||headBuffer[y][cei]||headBuffer[csi][x]||headBuffer[cni][x])
|
|
|
{
|
|
|
- rv_r+= g==0?1:0;
|
|
|
+ rv_r+= g==0?1:0;//s
|
|
|
heads_touched++;
|
|
|
continue;
|
|
|
}
|
|
|
- boardFF[y][x]=id;
|
|
|
+ if(boardFF[y][x]!=-1338)
|
|
|
+ {
|
|
|
+ boardFF[y][x]=id;
|
|
|
+ }
|
|
|
if(g<15) {
|
|
|
|
|
|
FFQueue.add(new int[]{x, cni, g + 1});
|
|
@@ -268,6 +276,7 @@ public class BotGame {
|
|
|
boardFF=new int[h][w];
|
|
|
headBuffer = new boolean[h][w];
|
|
|
out.print("chat|Red 5 standing by"+'\n');
|
|
|
+ out.print("chat|twyn_b please call RED5"+'\n');
|
|
|
l.info("R5SB");
|
|
|
out.flush();
|
|
|
tickets = new int[h][w];
|
|
@@ -307,14 +316,14 @@ public class BotGame {
|
|
|
c2wi=cw-1;
|
|
|
int c2ei=(cei+1)%cw;
|
|
|
|
|
|
- if(!(System.getProperties().containsKey("botdebug")))
|
|
|
+ /*if(!(System.getProperties().containsKey("botdebug")))
|
|
|
{
|
|
|
|
|
|
boardFF[cni][cwi] = -1;
|
|
|
boardFF[cni][cei] = -1;
|
|
|
boardFF[csi][cwi] = -1;
|
|
|
boardFF[csi][cei] = -1;
|
|
|
- }
|
|
|
+ }*/
|
|
|
/*
|
|
|
boardFF[c2ni][c2wi]=-1;
|
|
|
boardFF[c2ni][c2ei]=-1;
|
|
@@ -375,7 +384,7 @@ public class BotGame {
|
|
|
|
|
|
board[i][j]=0;
|
|
|
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));
|
|
|
- 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));
|
|
|
+ boardFF[i][j]=(boards[i][j]!=0)?-2:0;//||(boards[cni][j]!=0&&boards[csi][j]!=0)||(boards[i][cwi]!=0&&boards[j][cei]!=0));
|
|
|
if(j==cx&&i==cy)
|
|
|
{
|
|
|
//boardview+="X";
|
|
@@ -416,8 +425,12 @@ public class BotGame {
|
|
|
{
|
|
|
//int rnd = (int) (Math.random()*6);
|
|
|
//int rnd=(fuck/13)%4;
|
|
|
-
|
|
|
int rnd=lastDir;
|
|
|
+ if(ticksSinceStart<20)
|
|
|
+ {
|
|
|
+ rnd = (int) (Math.random()*4);
|
|
|
+ }
|
|
|
+
|
|
|
if(ticksSinceStart %100==0) returnMsgs.add("chat|Stay on Target! Stay on Target!");
|
|
|
if(ticksSinceStart %100==50) returnMsgs.add("chat|Red 5 standing by");
|
|
|
if(ticksSinceStart %100==75) returnMsgs.add("chat|rm -rf ~/botarmee*");
|
|
@@ -507,6 +520,14 @@ public class BotGame {
|
|
|
south=highest;
|
|
|
if(north==-1337)
|
|
|
north=highest;
|
|
|
+ if(east==-1338)
|
|
|
+ east=highest-1;
|
|
|
+ if(west==-1338)
|
|
|
+ west=highest-1;
|
|
|
+ if(south==-1338)
|
|
|
+ south=highest-1;
|
|
|
+ if(north==-1338)
|
|
|
+ north=highest-1;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -521,7 +542,10 @@ public class BotGame {
|
|
|
north=0;
|
|
|
}
|
|
|
}
|
|
|
- if((highest<((cw*ch)/(playercount+1))||playercount<3))
|
|
|
+ l.info("5h="+highest/5);
|
|
|
+ l.info("cmpval="+((cw*ch)/((playercount+1))));
|
|
|
+ if(((highest/5)<((cw*ch)/((playercount+1)))
|
|
|
+ ||playercount<3))
|
|
|
{
|
|
|
l.info("Switcheroo zone reached");
|
|
|
|
|
@@ -543,6 +567,7 @@ public class BotGame {
|
|
|
l.info("switcheroo="+switcheroo);
|
|
|
l.info("fnesw"+ ticksSinceStart +";"+north+";"+east+";"+south+";"+west);
|
|
|
int rnd=(int)(Math.random()*4);
|
|
|
+ l.info("rnd="+rnd);
|
|
|
if(ticksSinceStart %300<25&& ticksSinceStart >15)
|
|
|
{
|
|
|
rnd=0;
|