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

Nová malá vylepšení #233

Closed
befeleme opened this issue May 7, 2019 · 0 comments

Comments

Projects
2 participants
@befeleme
Copy link
Contributor

commented May 7, 2019

  • Zjednodušit get_direction_from_coordinates(start_coordinates, stop_coordinates)

Z review:

Tahle funkce mi vrta hlavou. My vime, jakou deltu maji jednotlive smery (maji to ve sve hodnote jako coor_delta), tak to nemusime znovu vypocitavat. Muj (nejspis trochu nepresny) navrh, jak to zkratit:

delta = stop_coordinates - start_coordinates 
for direction in list(Direction): #list(Direction) da nam k dispozici iterator se vsemi objekty smeru
    if direction.coor_delta == delta:
        return direction
  • zbavit se integerů (-1 až 3) ve vlastnostech políček v mapách tam, kde označují směry, odstranit map_properties z Direction, zbavit se transform_direction

  • v move_belts: colliding_robots a swapping_robots maji temer stejne radky kodu - dala by se tato cast zkratit a napsat jednou?

@JureckovaK JureckovaK added this to Todo in Projekt May 9, 2019

JureckovaK added a commit to JureckovaK/roboprojekt that referenced this issue May 21, 2019

Rework get_direction_from_coordinates function.
Functionality remains the same. Function now use Direction class
attributes to determine the direction from coordinates according
to code review.

PyLadiesCZ#233

@JureckovaK JureckovaK self-assigned this May 21, 2019

@JureckovaK JureckovaK moved this from Todo to Rozdělané in Projekt May 21, 2019

ivet1987 added a commit that referenced this issue May 21, 2019

Rework get_direction_from_coordinates function. (#242)
Functionality remains the same. Function now use Direction class
attributes to determine the direction from coordinates according
to code review.

#233

@befeleme befeleme closed this May 23, 2019

Projekt automation moved this from Rozdělané to Hotovo May 23, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.