Ejemplo n.º 1
0
 private void checkWallCollision() {
   if ((x - RADIUS <= 0)
       || (y - RADIUS <= 0)
       || (x + RADIUS >= battleRules.getBattlefieldWidth())
       || (y + RADIUS >= battleRules.getBattlefieldHeight())) {
     state = BulletState.HIT_WALL;
     frame = 0;
     owner.addEvent(new BulletMissedEvent(createBullet(false)));
   }
 }
Ejemplo n.º 2
0
 private String getNameForEvent(RobotPeer otherRobot) {
   if (battleRules.getHideEnemyNames() && !owner.isTeamMate(otherRobot)) {
     return otherRobot.getAnnonymousName();
   }
   return otherRobot.getName();
 }