-
Notifications
You must be signed in to change notification settings - Fork 1
First phase rumble to prevent robot from entering opponent's Barge #268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| this.controller = controller; | ||
| } | ||
|
|
||
| public static boolean isInOppositeBarge(double x, double y) { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done?
noahheller
left a comment
There was a problem hiding this 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
bengold22
left a comment
There was a problem hiding this 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() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to getY()
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
| public double getY() { | ||
| return Robot.getAllianceColor().isPresent() | ||
| ? Robot.getAllianceColor().get().equals(Alliance.Blue) ? y : y + 4 | ||
| : y; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
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.
|
pull, also, how is this branch so contentious? |
Not Drive Team Approved