@Override
    
    public Command planNextMove(Info info) {
       enemyDistance=null;
       enemyDistance= new double[info.getEnemies().size()];
       enemyAngle=null;
       enemyAngle= new double[info.getEnemies().size()];
       x=info.getX();
       y=info.getY();
       angle=info.getDirection();
       int i=0;
       for(InfoDetail enemy : info.getEnemies())
       {
           if(enemy.getX() > x)
               xDis=enemy.getX()-x;
           else
               xDis=x-enemy.getX();
           if(enemy.getY() > y)
               yDis=enemy.getY()-y;
           else
               yDis=y-enemy.getY();
           enemyDistance[i]= Math.sqrt(xDis*xDis+yDis*yDis);           
           enemyAngle[i++]=(double)yDis/xDis;
       }
       double delka=1000;
       int tmp=0;
       for(int a=0;a<enemyDistance.length;a++)
       {
           if(enemyDistance[a]<delka)
           {    
               tmp=a;
               delka=enemyDistance[a];
           }
       }
       
       angle=(int)Math.toDegrees(Math.atan(enemyAngle[tmp]));
       
        int test_cornerx = info.getX();
        int test_cornery = info.getY();
        
        if (test_cornerx <= 20 || test_cornerx >= 1900 || test_cornery <= 20 || test_cornery >= 1900)
        {
            boolean test = false;
            int uhel = info.getDirection();
           return new Command(CommandType.MOVE_FORWARD, CommandType.TURN_LEFT, 180, CommandType.NONE);
            
            
        }
       
    
       // return new Command(CommandType.MOVE_FORWARD, CommandType.NONE, 0, CommandType.SHOOT);
        return new Command(CommandType.MOVE_FORWARD, CommandType.TURN_LEFT, (360+info.getDirection()-angle), CommandType.SHOOT);
       
    }