Skip to content
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

WideStance Left and right #1208

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

larskna
Copy link
Contributor

@larskna larskna commented Jul 15, 2024

Why? What?

We want to jump to the right and left whith the WideStance, so we can better catch the blall
Its only for the keeper
Fixes #

ToDo / Known Issues

The Motienfile is in this moment indentical with the WideStance. That is only the .json file

Ideas for Next Iterations (Not This PR)

If there are some improvements that could be done in a next iteration, describe them here.

How to Test

You have to kick the ball to the Keeper (playernumber 1) and look

Comment on lines +75 to +92
match (
(-wide_stance_parameters.action_radius..=wide_stance_parameters.action_radius)
.contains(&horizontal_distance_to_intersection),
(wide_stance_parameters.action_radius..wide_stance_parameters.action_radius_left)
.contains(&horizontal_distance_to_intersection),
(-wide_stance_parameters.action_radius_left..-wide_stance_parameters.action_radius)
.contains(&horizontal_distance_to_intersection),
) {
(true, _, _) => Some(MotionCommand::WideStance {
direction: JumpDirection::Center,
}),
(false, true, _) => Some(MotionCommand::WideStance {
direction: JumpDirection::Left,
}),
(false, _, true) => Some(MotionCommand::WideStance {
direction: JumpDirection::Right,
}),
(false, false, false) => None,
Copy link
Contributor

Choose a reason for hiding this comment

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

I think a simple if-else statement is completely sufficient. This is basically a glorified if-else. Other opinions? @h3ndrk

Copy link
Member

Choose a reason for hiding this comment

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

Looks like it, but not sure about the _ in line 89 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm sure. All cases are mutually exclusive

@schluis schluis removed the RC24 label Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

3 participants