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))); } }
private String getNameForEvent(RobotPeer otherRobot) { if (battleRules.getHideEnemyNames() && !owner.isTeamMate(otherRobot)) { return otherRobot.getAnnonymousName(); } return otherRobot.getName(); }