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

Explictly test for players car in lane #477

Merged
merged 2 commits into from
Aug 27, 2023

Conversation

yaacov
Copy link
Member

@yaacov yaacov commented Aug 21, 2023

Issue:
When testing if a car is in lane, we do an implicit test, calculating the start and end x value of the player lane, it's better to use explicit calculation to get the lane directly from car position.

Signed-off-by: yzamir <kobi.zamir@gmail.com>
@yaacov yaacov changed the title Explictly test for playe in lane Explictly test for players car in lane Aug 21, 2023
@yaacov
Copy link
Member Author

yaacov commented Aug 21, 2023

@nirs @sleviim hi, can you review / refer to a reviewer ?

rose/server/player.py Show resolved Hide resolved
@nirs
Copy link
Member

nirs commented Aug 26, 2023

Issue: When testing if a car is in lane, we do an implicit test, calculating the start and end x value of the player lane, it's better to use explicit calculation to get the lane directly from car position.

Not clear to me why the current code is implicit and the new code is explicit. I think both
are the same in this aspect.

@yaacov yaacov force-pushed the explicit-in-lane branch 3 times, most recently from 4a9fcad to 7b3872f Compare August 26, 2023 18:12
Copy link
Member

@nirs nirs left a comment

Choose a reason for hiding this comment

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

Thanks the tests!

rose/server/player_test.py Outdated Show resolved Hide resolved
rose/server/player_test.py Outdated Show resolved Hide resolved
rose/server/player_test.py Outdated Show resolved Hide resolved
rose/server/player_test.py Outdated Show resolved Hide resolved
rose/server/player_test.py Outdated Show resolved Hide resolved
rose/server/player_test.py Outdated Show resolved Hide resolved
rose/server/player_test.py Outdated Show resolved Hide resolved
rose/server/player_test.py Outdated Show resolved Hide resolved
rose/server/player_test.py Outdated Show resolved Hide resolved
@yaacov yaacov force-pushed the explicit-in-lane branch 3 times, most recently from e9dadd8 to 4da7aab Compare August 26, 2023 19:14
rose/server/player.py Show resolved Hide resolved
rose/server/player_test.py Outdated Show resolved Hide resolved
rose/server/player_test.py Outdated Show resolved Hide resolved
rose/server/player_test.py Outdated Show resolved Hide resolved
@yaacov yaacov force-pushed the explicit-in-lane branch 2 times, most recently from 28a6bf3 to fbecad3 Compare August 27, 2023 04:35
@yaacov yaacov requested a review from nirs August 27, 2023 04:37
@yaacov yaacov force-pushed the explicit-in-lane branch 2 times, most recently from 66efbe6 to c0ae8d1 Compare August 27, 2023 07:14
rose/server/player.py Outdated Show resolved Hide resolved
rose/server/player_test.py Outdated Show resolved Hide resolved
rose/server/player_test.py Outdated Show resolved Hide resolved
rose/server/player_test.py Outdated Show resolved Hide resolved
Signed-off-by: yzamir <kobi.zamir@gmail.com>
@nirs nirs merged commit 2ed7094 into RedHat-Israel:master Aug 27, 2023
1 check passed
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.

None yet

2 participants