@Test public void testExecute1v1() { DiamondFist gun = newGun(true, false); mock1v1(gun, _shadow); when(gunDataManager.duelEnemy()).thenReturn(_shadow); gun.execute(); verify(gunDataManager).execute(anyInt(), anyLong(), anyDouble(), anyDouble(), (Point2D.Double) any(), anyBoolean(), anyBoolean()); verify(diamond).setTurnGunRightRadians(anyDouble()); }
public void execute() { _gunDataManager.execute(_robot.getRoundNum(), _robot.getTime(), calculateBulletPower(), _robot.getGunHeat(), myLocation(), is1v1(), paintStatus()); if (is1v1()) { GunEnemy duelEnemy = _gunDataManager.duelEnemy(); if (duelEnemy != null) { aimAndFire(duelEnemy); if (!_startedDuel) { _startedDuel = true; printCurrentGun(duelEnemy); } } } else { aimAndFireAtEveryone(); } if (paintStatus() && _drawVictory) { _gunDataManager.drawVictory(_robot.getTime()); _drawVictory = false; } }
DiamondFist implements RoboPainter { public void execute() { _gunDataManager.execute(_robot.getRoundNum(), _robot.getTime(), calculateBulletPower(), _robot.getGunHeat(), myLocation(), is1v1(), paintStatus()); if (is1v1()) { GunEnemy duelEnemy = _gunDataManager.duelEnemy(); if (duelEnemy != null) { aimAndFire(duelEnemy); if (!_startedDuel) { _startedDuel = true; printCurrentGun(duelEnemy); } } } else { aimAndFireAtEveryone(); } if (paintStatus() && _drawVictory) { _gunDataManager.drawVictory(_robot.getTime()); _drawVictory = false; } } }
DiamondFist implements RoboPainter { public void execute() { _gunDataManager.execute(_robot.getRoundNum(), _robot.getTime(), calculateBulletPower(), _robot.getGunHeat(), myLocation(), is1v1(), paintStatus()); if (is1v1()) { GunEnemy duelEnemy = _gunDataManager.duelEnemy(); if (duelEnemy != null) { aimAndFire(duelEnemy); if (!_startedDuel) { _startedDuel = true; printCurrentGun(duelEnemy); } } } else { aimAndFireAtEveryone(); } if (paintStatus() && _drawVictory) { _gunDataManager.drawVictory(_robot.getTime()); _drawVictory = false; } } DiamondFist(Diamond robot, boolean isTcMode);   DiamondFist(Diamond robot, boolean isTcMode, BattleField battleField,
      Collection<RoboGraphic> renderables, OutputStream out);   DiamondFist(Diamond robot, boolean isTcMode, BattleField battleField,
      MovementPredictor predictor, Collection<RoboGraphic> renderables,
      OutputStream out);   DiamondFist(Diamond robot, boolean isTcMode, GunDataManager gunDataManager,
      VirtualGunsManager<TimestampedFiringAngle> virtualGunsManager,
      BattleField battleField, Collection<RoboGraphic> renderables,
      OutputStream out); }
DiamondFist implements RoboPainter { public void execute() { _gunDataManager.execute(_robot.getRoundNum(), _robot.getTime(), calculateBulletPower(), _robot.getGunHeat(), myLocation(), is1v1(), paintStatus()); if (is1v1()) { GunEnemy duelEnemy = _gunDataManager.duelEnemy(); if (duelEnemy != null) { aimAndFire(duelEnemy); if (!_startedDuel) { _startedDuel = true; printCurrentGun(duelEnemy); } } } else { aimAndFireAtEveryone(); } if (paintStatus() && _drawVictory) { _gunDataManager.drawVictory(_robot.getTime()); _drawVictory = false; } } DiamondFist(Diamond robot, boolean isTcMode);   DiamondFist(Diamond robot, boolean isTcMode, BattleField battleField,
      Collection<RoboGraphic> renderables, OutputStream out);   DiamondFist(Diamond robot, boolean isTcMode, BattleField battleField,
      MovementPredictor predictor, Collection<RoboGraphic> renderables,
      OutputStream out);   DiamondFist(Diamond robot, boolean isTcMode, GunDataManager gunDataManager,
      VirtualGunsManager<TimestampedFiringAngle> virtualGunsManager,
      BattleField battleField, Collection<RoboGraphic> renderables,
      OutputStream out); void initRound(Diamond robot); void execute(); void onScannedRobot(ScannedRobotEvent e); void onRobotDeath(RobotDeathEvent e); void onWin(WinEvent e); void onDeath(DeathEvent e); void onBulletHit(BulletHitEvent e); void onBulletHitBullet(BulletHitBulletEvent e); void onPaint(Graphics2D g); int getEnemiesAlive(); void addFireListener(FireListener listener); void paintOn(); void paintOff(); void robocodePaintOn(); void robocodePaintOff(); String paintLabel(); boolean paintStatus(); }
DiamondFist implements RoboPainter { public void execute() { _gunDataManager.execute(_robot.getRoundNum(), _robot.getTime(), calculateBulletPower(), _robot.getGunHeat(), myLocation(), is1v1(), paintStatus()); if (is1v1()) { GunEnemy duelEnemy = _gunDataManager.duelEnemy(); if (duelEnemy != null) { aimAndFire(duelEnemy); if (!_startedDuel) { _startedDuel = true; printCurrentGun(duelEnemy); } } } else { aimAndFireAtEveryone(); } if (paintStatus() && _drawVictory) { _gunDataManager.drawVictory(_robot.getTime()); _drawVictory = false; } } DiamondFist(Diamond robot, boolean isTcMode);   DiamondFist(Diamond robot, boolean isTcMode, BattleField battleField,
      Collection<RoboGraphic> renderables, OutputStream out);   DiamondFist(Diamond robot, boolean isTcMode, BattleField battleField,
      MovementPredictor predictor, Collection<RoboGraphic> renderables,
      OutputStream out);   DiamondFist(Diamond robot, boolean isTcMode, GunDataManager gunDataManager,
      VirtualGunsManager<TimestampedFiringAngle> virtualGunsManager,
      BattleField battleField, Collection<RoboGraphic> renderables,
      OutputStream out); void initRound(Diamond robot); void execute(); void onScannedRobot(ScannedRobotEvent e); void onRobotDeath(RobotDeathEvent e); void onWin(WinEvent e); void onDeath(DeathEvent e); void onBulletHit(BulletHitEvent e); void onBulletHitBullet(BulletHitBulletEvent e); void onPaint(Graphics2D g); int getEnemiesAlive(); void addFireListener(FireListener listener); void paintOn(); void paintOff(); void robocodePaintOn(); void robocodePaintOff(); String paintLabel(); boolean paintStatus();  }