public void addFirst(Robot eve) {

	if (eve.getData().getGeneration() != 0) {
	    throw new IllegalArgumentException("Robot is not first generation");
	}
	if (getBotsCount(eve.getData().getTeamId(), false) > 0) {
	    throw new IllegalArgumentException(
		    "Provided robot is not the first from its team. Use add(Robot, Robot) instead");
	}
	Point newPosition;
	do {
	    // TODO: check this, looks biased
	    int x = generator.nextInt(GameSettings.getInstance().BOARD_SIZE);
	    int y = generator.nextInt(GameSettings.getInstance().BOARD_SIZE);
	    newPosition = new Point(x, y);
	} while (isOccupied(newPosition));

	addCommon(eve, newPosition);
    }
public void addFirst ( Robot eve ) { if ( eve . getData ( ) . getGeneration ( ) != 0 ) { throw new IllegalArgumentException ( "Robot is not first generation" ) ; } if ( getBotsCount ( eve . getData ( ) . getTeamId ( ) , false ) > 0 ) { throw new IllegalArgumentException ( "Provided robot is not the first from its team. Use add(Robot, Robot) instead" ) ; } Point newPosition ; do { int x = generator . nextInt ( GameSettings . getInstance ( ) . BOARD_SIZE ) ; int y = generator . nextInt ( GameSettings . getInstance ( ) . BOARD_SIZE ) ; newPosition = new Point ( x , y ) ; } while ( isOccupied ( newPosition ) ) ; addCommon ( eve , newPosition ) ; }
Adds the first robot of a team. The robot becomes owned by <i>this</i> object

@param eve the first robot of the player
@throws IllegalArgumentException if the robot is not the first from its team or it exists
already