Skip to content

Conversation

@neo-Aditya
Copy link
Contributor

@neo-Aditya neo-Aditya commented Mar 16, 2025

Not Drive Team Approved

this.controller = controller;
}

public static boolean isInOppositeBarge(double x, double y) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would put this in a separate utils class maybe like FieldZoneUtils

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

return AllianceColor.equals(Alliance.Blue) ? y : y + 4;
}
public double getYFromAlliaceColor() {
return Robot.getAllianceColor().get().equals(Alliance.Blue) ? y : y + 4;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will throw an error if alliance color is not present

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done?

Copy link
Contributor

@noahheller noahheller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also build your code

Copy link
Contributor

@bengold22 bengold22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no actual mapping of this command into RobotContainer

return AllianceColor.equals(Alliance.Blue) ? y : y + 4;
}

public double getYFromAlliaceColor() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename to getY()

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait you can name two methods the same thing as long as you have different constructors that is very cool :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, as long as they have different "signatures." A signature is made up of the name of the method and the parameters in the method. So, as long as you have different parameters (or different orders), you can have the same name.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about getY(double Y, double X) and getY(double X, double Y) do these count as two different signatures or does it only look at the variable type

@JAMthepersonj JAMthepersonj dismissed stale reviews from bengold22 and noahheller March 24, 2025 13:01

stale

public double getY() {
return Robot.getAllianceColor().isPresent()
? Robot.getAllianceColor().get().equals(Alliance.Blue) ? y : y + 4
: y;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return -1 if alliance color isn't present

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this only has one method and only affects one file then don't have it.

@Levercpu
Copy link
Contributor

pull, also, how is this branch so contentious?

@Levercpu Levercpu changed the title First phase rumble First phase rumble to prevent robot from entering opponent's Barge Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants