亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? brianteam.java

?? 一個多機器人的仿真平臺
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
set_state( OPEN_BALL );               }            }         }      }}      /*--- Send commands to actuators ---*/      // set the heading      abstract_robot.setSteerHeading(curr_time, result.t);      // set speed at maximum      abstract_robot.setSpeed(curr_time, 1.0);      // kick it if we can      if (abstract_robot.canKick(curr_time))         if( kick_ball )            abstract_robot.kick(curr_time);      // tell the parent we're OK      return(CSSTAT_OK);   }   static final double GOAL_X = 1.0;   boolean i_am_in_my_goalbox()   // true if on far side of field   {      if( i_am_on_east_team() )         return me.x > GOAL_X;      else         return me.x < -GOAL_X;   }   boolean i_am_in_top_half_of_field()   // lies, tells if in a little higher   {      return me.y > 0.1;   }   double toward_behind_ball()   // returns theta direction to go if we want to get behind the ball   {      // for now, we'll just be stupid and bump it backwards      Vec2 result;      double FUDGE = 0.02;      if( i_am_on_east_team() )         result = new Vec2( ball.x + (ROBOT_RADIUS+FUDGE), ball.y );       else         result = new Vec2( ball.x - (ROBOT_RADIUS+FUDGE), ball.y );       // make egocentric      result.sub( me );      if( robot_close_to_ball( me ) && !i_have_the_ball() )      {         // i am very near it, but am not behind it         // try and run around it         if( i_am_in_top_half_of_field() != i_am_on_east_team() )         {if( DEBUG_AROUND ){System.out.print( my_name() + " is running around in plus-theta direction" );System.out.println( " and thinks on top half: " + i_am_in_top_half_of_field() );}            return result.t + Math.PI/3;         }         else         {if( DEBUG_AROUND ){System.out.print( my_name() + " is running around in minus-theta direction" );System.out.println( " and thinks on top half: " + i_am_in_top_half_of_field() );}            return result.t - Math.PI/3;         }      }      else         return result.t;   }   Vec2 bottom_goalpost()   // returns location of their bottom goalpost   {      return new Vec2( theirgoal.x, theirgoal.y - GOAL_WIDTH/2 );   }   Vec2 top_goalpost()   // returns location of their top goalpost   {      return new Vec2( theirgoal.x, theirgoal.y + GOAL_WIDTH/2 );   }   boolean i_have_a_clear_shot()   // returns true if I have a clear shot on goal   {      if( !i_have_the_ball() )         return false;      double dir_ball, dir_top_goal, dir_bottom_goal;      if( i_am_on_east_team() )      {         dir_ball = normalize_pi( toward( me, ball ).t );         dir_top_goal = normalize_pi( toward( me, top_goalpost() ).t );         dir_bottom_goal = normalize_pi( toward( me, bottom_goalpost() ).t );      }      else      {         dir_ball = normalize_zero( toward( me, ball ).t );         dir_top_goal = normalize_zero( toward( me, top_goalpost() ).t );         dir_bottom_goal = normalize_zero( toward( me, bottom_goalpost() ).t );      }      if( between( dir_ball, dir_top_goal, dir_bottom_goal ) )         return true;      return false;   }   static final double OPENNESS = ROBOT_RADIUS;  // arbitrary value   boolean i_am_open()   {      return open( me, true );   }   boolean open( Vec2 robot, boolean my_team )   // tells if a given robot is "open".  my_team true if on my team   {      Vec2 bad[];      if( my_team )          bad = ego_opponents;      else         bad = ego_teammates;            Vec2 temp;      for( int i=0; i<bad.length; i++ )      {         temp = new Vec2( bad[i].x, bad[i].y );         // correct for fact that "bad" is egocentric         temp.add( me );         temp.sub( robot );//if( names[(int)my_id()].equals("yellow") )//System.out.println( "temp r is " + temp.r );         if( temp.r < OPENNESS )         {//if( names[(int)my_id()].equals("yellow") )//System.out.println( "" );            return false;         }      }//if( names[(int)my_id()].equals("yellow") )//System.out.println( "" );      return true;   }   boolean clear( Vec2 v )   // determines if egocentric vector from v is clear of any robots   {      int i;      for( i=0; i<ego_teammates.length; i++ )         if( robot_intersects( ego_teammates[i], v ) )            return false;              for( i=0; i<ego_opponents.length; i++ )         if( robot_intersects( ego_opponents[i], v ) )            return false;      return true;   }   boolean robot_intersects( Vec2 robot, Vec2 v )   // returns true if ego-robot intersects ego-v   {      double dt = normalize_zero( v.t - robot.t );      double dist_robot_to_v = robot.r * Math.sin( dt );      if( dist_robot_to_v > ROBOT_RADIUS )         return false;      return true;   }   boolean i_have_the_ball()   // returns true if I'm "behind" the ball and very near it   {      if( !robot_close_to_ball( me ) )         return false;      if( !i_am_behind_ball() )         return false;      return true;   }   boolean i_am_behind_ball()   // returns true if ball is "towards goal" rel to me   {      if( i_am_on_east_team() )      {         if( ball.x >= me.x ) return false;      }      else      {         if( ball.x <= me.x ) return false;      }      Vec2 top = top_goalpost();      Vec2 bottom = bottom_goalpost();      top.sub( me );     // make egocentric      bottom.sub( me );      double rel_top = normalize_zero( top.t - ego_ball.t );      double rel_bot = normalize_zero( bottom.t - ego_ball.t );      return between( 0, rel_top, rel_bot );   }          double defend_goal()   // returns direction we should go to be defending goal   {      Vec2 result;      Vec2 goal = ourgoal;      if( ball.y > top_goalpost().y )         goal.sety( top_goalpost().y );      else if( ball.y < bottom_goalpost().y )         goal.sety( bottom_goalpost().y );      else         goal.sety( ball.y );      result = toward( goal, ball );      result.setr( ROBOT_RADIUS );      result.add( goal );      result.sub( me );      return result.t;   }   static final double CLOSENESS = 0.05;   boolean robot_close_to_ball( Vec2 robot )   {      Vec2 temp = new Vec2( robot.x, robot.y );      temp.sub( ball );//if( names[(int)my_id()].equals("yellow") )//System.out.println( "temp.r is " + temp.r + " RR is " + ROBOT_RADIUS +//   " BR is " + BALL_RADIUS + " C is " + CLOSENESS );      if( temp.r > ROBOT_RADIUS + BALL_RADIUS + CLOSENESS )         return false;      return true;   }   static double normalize_pi( double t )   // converts a radian measure to between 0 and 2 pi   {      while( t > 2*Math.PI ) { t -= 2*Math.PI; }      while( t < 0 ) { t += 2*Math.PI; }      return t;   }   static double normalize_zero( double t )   // converts a radian measure to between -pi and pi   {      while( t > Math.PI ) { t -= 2*Math.PI; }      while( t < -Math.PI ) { t += 2*Math.PI; }      return t;   }   boolean i_am_on_east_team()   {      return !i_am_on_west_team();   }   boolean i_am_on_west_team()   {      return ourgoal.x < 0;   }   static boolean between( double a, double b, double c )   // return true if a between b and c   {      return (a<=Math.max(b,c)) && (a>=Math.min(b,c));   }}class Debugger{   public static final int        HAS_THE_BALL      = 0,       HAS_CLEAR_SHOT    = 1,       IS_OPEN           = 2,       CLOSE_TO_THE_BALL = 3,       BEHIND_THE_BALL   = 4,       CLOSEST_TO_BALL   = 5,       TOP_HALF_OF_FIELD = 6,       IN_GOALBOX = 7,       dummy             = -1;   public static final int MAX = 8;   final static String yes[] = {       "gets the ball!",       "has a clear shot!",       "has gotten open!",       "has gotten close to the ball.",       "is behind the ball.",       "is closest to the ball.",       "is in top half of field.",       "is in his own goalbox.",       "" };   final static String no[] = {       "no longer has the ball.",       "no longer has a clear shot.",       "is no longer open!",       "is no longer close to the ball.",       "is no longer behind the ball.",       "is no longer closest to the ball.",       "is in bottom half of field.",       "is not in his own goalbox.",       "" };   public boolean f()   {      switch( which )      {         case HAS_THE_BALL:            return robot.i_have_the_ball();                  case HAS_CLEAR_SHOT:            return robot.i_have_a_clear_shot();                  case IS_OPEN:            return robot.i_am_open();                  case CLOSE_TO_THE_BALL:            return robot.robot_close_to_ball( robot.me );                  case BEHIND_THE_BALL:            return robot.i_am_behind_ball();                  case CLOSEST_TO_BALL:            return robot.i_am_closest_to_the_ball();                  case TOP_HALF_OF_FIELD:            return robot.i_am_in_top_half_of_field();                  case IN_GOALBOX:            return robot.i_am_in_my_goalbox();                  default:            return false;      }   }   int which;   boolean highlight=false;   BrianTeam robot;   public Debugger( BrianTeam robot, int which )   {      this( robot, which, false );   }   public Debugger( BrianTeam robot, int which, boolean hl )   {       this.highlight = hl;      this.robot = robot;       this.which = which;             int id = (int)robot.my_id();      if( f() )      {         if( !robot.debug_reminders[which] )         {            if( highlight ) System.out.print( "--> " );            System.out.println( "Robot " + BrianTeam.names[id] + " " +                        yes[which] );            robot.debug_reminders[which] = true;         }      }      else      {         if( robot.debug_reminders[which] )         {                          if( highlight ) System.out.print( "--> " );            System.out.println( "Robot " + BrianTeam.names[id] + " " +                        no[which] );            robot.debug_reminders[which] = false;         }      }   }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美性受xxxx黑人xyx| 91天堂素人约啪| 欧美一a一片一级一片| 精品欧美一区二区三区精品久久| 亚洲日本乱码在线观看| 国产精品一区二区不卡| 欧美精品日日鲁夜夜添| 亚洲日本在线看| 懂色av噜噜一区二区三区av| 欧美一级日韩一级| 亚洲小说欧美激情另类| 成人国产精品免费网站| 精品国精品自拍自在线| 视频精品一区二区| 欧美天天综合网| 亚洲精品成人在线| 91精品免费在线观看| 亚洲欧美在线aaa| 国产成人在线视频网址| 欧美精品一区二区三区四区 | 欧美影院午夜播放| 国产精品全国免费观看高清| 久久国内精品视频| 欧美一级午夜免费电影| 天天综合网 天天综合色| 91久久精品一区二区三区| 国产精品三级视频| 成人小视频免费观看| 久久免费看少妇高潮| 久久国产生活片100| 欧美一区二区二区| 免费视频一区二区| 国产成人综合亚洲91猫咪| 久久久777精品电影网影网| 国内精品不卡在线| 久久久久久久久久美女| 国产精品伊人色| 久久久www免费人成精品| 久久99久久精品欧美| 日韩欧美一区二区三区在线| 蜜臀久久久久久久| 日韩欧美黄色影院| 久久疯狂做爰流白浆xx| 精品国产乱码久久久久久久| 看国产成人h片视频| 欧美本精品男人aⅴ天堂| 精品一区二区在线观看| 久久久精品人体av艺术| 成人网页在线观看| 国产精品久久久久久久久免费相片| 成人妖精视频yjsp地址| 亚洲欧洲日韩在线| 色爱区综合激月婷婷| 一区二区三区在线播放| 欧美在线免费播放| 亚洲mv在线观看| 4hu四虎永久在线影院成人| 美女网站视频久久| 亚洲精品一区二区三区在线观看 | 美日韩一级片在线观看| 2023国产精品视频| 成人的网站免费观看| 亚洲激情自拍视频| 在线不卡的av| 国产在线精品不卡| 国产精品久久久久久久久免费相片| 色噜噜狠狠一区二区三区果冻| 亚洲国产毛片aaaaa无费看| 69堂国产成人免费视频| 狠狠色综合日日| 中文字幕欧美区| 91福利视频久久久久| 蜜桃视频一区二区| 国产精品久久久久婷婷| 欧美在线影院一区二区| 麻豆freexxxx性91精品| 国产三级精品三级| 日本精品一区二区三区四区的功能| 视频一区中文字幕国产| 国产日韩精品久久久| 欧美中文字幕亚洲一区二区va在线| 奇米精品一区二区三区在线观看一| 国产日韩欧美制服另类| 欧美午夜寂寞影院| 色呦呦日韩精品| 日韩av不卡一区二区| 国产欧美精品一区二区色综合| 日本久久一区二区| 黄色小说综合网站| 亚洲精品亚洲人成人网在线播放| 91精品国产综合久久精品图片| 国产成人精品三级| 亚洲午夜三级在线| 国产丝袜在线精品| 欧美视频中文一区二区三区在线观看| 九九精品视频在线看| 亚洲色图丝袜美腿| 欧美电影免费观看完整版| 99久久精品免费观看| 久久99热国产| 亚洲综合一二三区| 久久综合色婷婷| 欧美色图天堂网| 国产一二精品视频| 午夜精品久久久久久久久久久 | 91麻豆精品在线观看| 久久国产尿小便嘘嘘尿| 亚洲视频一区在线| 久久综合久久综合九色| 欧美系列在线观看| 国产成人精品综合在线观看| 天天影视网天天综合色在线播放| 国产精品视频免费看| 日韩欧美在线观看一区二区三区| 91碰在线视频| 国产91精品欧美| 极品瑜伽女神91| 午夜精品福利久久久| 日韩久久一区二区| 国产片一区二区| 欧美成人激情免费网| 欧美日韩小视频| 成a人片亚洲日本久久| 久久66热re国产| 日韩av电影免费观看高清完整版在线观看 | 3751色影院一区二区三区| 毛片不卡一区二区| 中文字幕日本乱码精品影院| 精品人伦一区二区色婷婷| 6080亚洲精品一区二区| 色婷婷久久99综合精品jk白丝| 国产高清不卡一区| 国内精品嫩模私拍在线| 美女任你摸久久| 水蜜桃久久夜色精品一区的特点| 一二三四区精品视频| 亚洲欧美国产毛片在线| 国产精品久久久久久久久免费相片 | 97精品国产露脸对白| 国内精品自线一区二区三区视频| 日本午夜一本久久久综合| 午夜久久久影院| 亚洲国产成人av网| 一区二区三国产精华液| 亚洲精品美国一| 亚洲色图色小说| 亚洲色图制服诱惑| 亚洲色图都市小说| 亚洲女性喷水在线观看一区| 中文字幕中文乱码欧美一区二区| 欧美国产综合色视频| 亚洲成人高清在线| 悠悠色在线精品| 亚洲自拍偷拍av| 伊人色综合久久天天人手人婷| 亚洲视频一区二区在线| 自拍偷拍亚洲欧美日韩| 中文字幕一区二区三区不卡在线 | 日韩欧美另类在线| 日韩欧美激情四射| 精品国产一区二区三区四区四| 精品国产一区二区三区忘忧草| 精品久久久久久亚洲综合网| 欧美r级电影在线观看| 精品国产免费视频| 久久久久久久久99精品| 国产亚洲欧洲997久久综合| 国产女主播在线一区二区| 国产精品网曝门| 中文字幕在线一区二区三区| 亚洲视频 欧洲视频| 亚洲日本va午夜在线影院| 亚洲午夜在线观看视频在线| 日韩精品视频网| 久久99久久精品欧美| 国产激情视频一区二区三区欧美| 成人性视频免费网站| 色又黄又爽网站www久久| 精品视频在线免费观看| 在线成人免费观看| 久久综合狠狠综合久久综合88| 国产无遮挡一区二区三区毛片日本| 中文字幕欧美国产| 一级中文字幕一区二区| 日本不卡视频一二三区| 国产毛片精品一区| 91免费看`日韩一区二区| 欧美午夜在线观看| 日韩欧美国产午夜精品| 国产精品网站在线观看| 亚洲一区免费视频| 久久av中文字幕片| 丁香网亚洲国际| 欧美日韩久久不卡| 国产亚洲综合在线| 一区二区三区毛片| 精品一区二区在线视频| 91网站黄www| 91精品国产麻豆| 国产精品人成在线观看免费|