Example #1
0
 public RobotModel(AdvancedRobot self) {
   this(
       self.getName(),
       self.getHeight(),
       self.getWidth(),
       self.getEnergy(),
       self.getGunCoolingRate(),
       self.getGunHeadingRadians(),
       self.getGunHeat(),
       self.getRadarHeadingRadians(),
       self.getHeadingRadians(),
       self.getVelocity(),
       self.getX(),
       self.getY());
 }
Example #2
0
 public RobotModel(ScannedRobotEvent fs, AdvancedRobot parent) { // firstScan
   this(
       fs.getName(),
       parent.getHeight(),
       parent.getWidth(),
       fs.getEnergy(),
       // TODO update parent. if a more intelligent method is found
       parent.getGunCoolingRate(),
       parent.getGunHeadingRadians(),
       parent.getGunHeat(),
       parent.getRadarHeadingRadians(),
       fs.getHeadingRadians(),
       fs.getVelocity(),
       // adjusted locations
       getX(fs, parent.getHeadingRadians(), parent.getX()),
       getY(fs, parent.getHeadingRadians(), parent.getY()));
   this.parent = parent;
 }