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

Simplify get_start_tiles function #245

Open
wants to merge 70 commits into
base: master
from

Conversation

5 participants
@JureckovaK
Copy link
Contributor

commented May 22, 2019

Add attribute type to Tile class and rework get_start_tiles function.

JureckovaK and others added some commits May 22, 2019

connection asyncio + pyglet
adjust robot_from_dict, state_from_dict
Edit move_belts function (#246)
* Edit move_belts function.

* Fix test for swapping robots.
Update client_receiver.py
Co-Authored-By: Anezka Muller <anezka.muller@gmail.com>
Delete line
Co-Authored-By: Anezka Muller <anezka.muller@gmail.com>
@befeleme
Copy link
Contributor

left a comment

Super! Přemýšlím, jestli atribut type by se nedal nějak využít pro zjednodušení jiných kousků kodů, ale s tímto PR to nesouvisí.

tile.py Outdated
@@ -6,9 +6,10 @@


class Tile:
def __init__(self, direction, name, properties):
def __init__(self, direction, name, type, properties):

This comment has been minimized.

Copy link
@befeleme

befeleme May 23, 2019

Contributor

Před časem jsem používala "type" jako název proměnné v testech. Pak jsme se domluvili, že to není nejvhodnější způsob, protože type je zároveň slovo s pythonním významem. Pro jednoznčnost navrhuji něco jako tile_type.

This comment has been minimized.

Copy link
@JureckovaK

JureckovaK May 23, 2019

Author Contributor

Aha, to máš pravdu. Díky!

anezkamll and others added some commits May 23, 2019

Merge pull request #247 from ivet1987/server
Connection asyncio + pyglet

@befeleme befeleme added this to Rozdělané in Projekt May 24, 2019

ivet1987 and others added some commits May 26, 2019

client_interface
connection client with interface
- delete decorator, global variable from interface_frontend
- adjust client_interface - send message to server every time keyboard pressed
- client doesnt disconnect after sending one message
Update client_interface.py
Co-Authored-By: Karolina <33810531+befeleme@users.noreply.github.com>
Update client_interface.py
Co-Authored-By: Karolina <33810531+befeleme@users.noreply.github.com>
update comment
Co-Authored-By: Karolina <33810531+befeleme@users.noreply.github.com>
New tests to framework (#250)
* Teach framework working with hidden attributes.

* Extend repair_robot to be able to work with shortened registers count. WIP.

* Fix formatting

* Fix tests & map after change in backend.

* Add test - repair doesn't affect robots before it is last register.

* Add test for repair tiles - change coordinates.

* Adjust code to correctly read the setup for the new test.

* Add tests of cards effects, clean up a bit.

* Add test of flag effects - collecting and change of start coordinates.

* Change tests so that they use mainly the apply_all_effects function.

* Change initial damages to 0.

* Add test to check laser effects - both tiles and shootings.

* Erase the laser test from backend.

* Rework get_registers so it handles the situation when there is no actions in commands.

* Add test - robots with power_down don't shoot.

* Erase test with power down vs lasers.

* Fix typo -> prerequisites.

* Rework getting the maps and commands files, use .get() for getting the values from yaml.

* Add better laser maps.

* Add attributes and values range to attributes + how to add new tests section.

* Fix formatting.

* Make description of attributes more logical.

* Update tests/test_movement_1/map.json

Co-Authored-By: ivet1987 <39279854+ivet1987@users.noreply.github.com>

ivet1987 and others added some commits Jun 19, 2019

Merge pull request #269 from ivet1987/interface_data
Client interface send data about his state
Merge pull request #268 from ivet1987/server_receiver
Server doesnt wait for msg from client receiver
State change (#271)
* Move get_start_state to be State method, change server and receiver accordingly.

* Fix tests to reflect changing function to method.

* Move get_tiles_count to be method of State object.

* Move check_robot_in_the_way to be State method.

* Move check_the_absence_of_a_wall as a State method.

* Move belts functions to be State methods.

* Move functions around game play to be State methods.

* Minor fixes of docstrings.

* Delete commented lines - receiver gets only the game state.
Add tests (#273)
* Add tests to framework, extend validations to test maps.

* Add test that reveals the bug in code.

* Fix move_belts method.

* Clean test_backend after moving tests to framework.
Update server.py
Co-Authored-By: Karolina <33810531+befeleme@users.noreply.github.com>
Merge pull request #272 from ivet1987/data
Server assings robot to client_interface
@befeleme

This comment has been minimized.

Copy link
Contributor

commented Jun 25, 2019

@JureckovaK, pokusila jsem se o změnu těch type na tile_type, ale dotáhla jsem s tím i celou historii gitu :-/
Měnila jsem jen konflikty v test_backend + tile.py.
Pokud souhlasíš se změnami, můžeme to začlenit se squashem.

Postup, který jsem provedla pro takový nehezký výsledek:

  1. Odpíchla jsem lokalne novou branch od master.
  2. Udělala jsem pull kódu tohoto PR.
  3. Vyřesila jsem konflikty a udělala commit výsledku.
  4. Provedla jsem změnu v tile.py a commitla ji.
  5. Udělala jsem push do tohoto PR.
  • Jak to udělat příště líp, abych nezatáhla celou historii s sebou?
@encukou

This comment has been minimized.

Copy link
Member

commented Jun 25, 2019

Hm, tohle GitHub začal z nějakého důvodu dělat, mám dojem, docela nedávno – dřív to s takovým postupem vypadalo krásně. Je to čistě o tom jak to GitHub zobrazuje: když si změny stáhneš k sobě (viz odkaz command line instructions), bude historie OK.

ivet1987 added a commit that referenced this pull request Jun 26, 2019

The same as #245 - simplify get_start_tiles and add tile_type to Tile…
… class. (#276)

* Add attribute type to Tile class and simplify get_start_tiles function.

* Rename type to tile_type to avoid ambiguity.

* Fix pusher's test.
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.