Skip to content

Distinction between AdvancedRobots and normal Robots has not been implemented #1

Description

@tysm

The current implementation allows the robot to choose whether to set a call of execute an action by passing the keyword argument execute = True. Since AdvancedRobots were allowed to fight normal Robots, I didn't see the necessity of developing both classes.

I might be wrong but the biggest implication of this design decision is that the Robots won't have aiming aid as the following code provides:

if (currentTopEvent != null && currentTopEvent.getTime() == status.getTime() && !statics.isAdvancedRobot()
		&& status.getGunHeadingRadians() == status.getRadarHeadingRadians()
		&& ScannedRobotEvent.class.isAssignableFrom(currentTopEvent.getClass())) {
	// this is angle assisted bullet
	ScannedRobotEvent e = (ScannedRobotEvent) currentTopEvent;
	double fireAssistAngle = Utils.normalAbsoluteAngle(status.getHeadingRadians() + e.getBearingRadians());

	bullet = new Bullet(fireAssistAngle, getX(), getY(), power, statics.getName(), null, true, nextBulletId);
	wrapper = new BulletCommand(power, true, fireAssistAngle, nextBulletId);
} else {
	// this is normal bullet
	bullet = new Bullet(status.getGunHeadingRadians(), getX(), getY(), power, statics.getName(), null, true,
			nextBulletId);
	wrapper = new BulletCommand(power, false, 0, nextBulletId);
}

I'm opening this issue in order to discuss if this aiming aid is something that Robopy should provide.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions