From 97a210167ce95a280e5de3c785568474c360cf3a Mon Sep 17 00:00:00 2001 From: Tomasz Adamczyk Date: Sat, 10 Apr 2021 19:16:34 +0200 Subject: [PATCH] =?UTF-8?q?naprawiony=20b=C5=82=C4=85d=20cofania?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/workspace.xml | 36 ++++++++-------- __pycache__/definitions.cpython-37.pyc | Bin 3400 -> 3400 bytes __pycache__/graph.cpython-37.pyc | Bin 4392 -> 4392 bytes __pycache__/plant.cpython-37.pyc | Bin 1713 -> 2478 bytes __pycache__/tractor.cpython-37.pyc | Bin 8619 -> 8643 bytes plant.py | 56 ++++++++++++------------- py.py | 10 +++-- tractor.py | 8 ++-- 8 files changed, 57 insertions(+), 53 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index a180c67..6864bd5 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -3,7 +3,6 @@ - @@ -114,6 +113,7 @@ + @@ -125,38 +125,38 @@ - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + @@ -174,6 +174,6 @@ - + \ No newline at end of file diff --git a/__pycache__/definitions.cpython-37.pyc b/__pycache__/definitions.cpython-37.pyc index aae9f00fa4e4380229470a74978e82a66cc3da37..ba1ba5ce0c0f2f96c09a3e35192ba44f41f7d49b 100644 GIT binary patch delta 212 zcmX>hbwY~QiI;fdEC+7f3naNXt zr0nE9%#xCFQJN{NQCcZ1QQ9f;Q93DdQMxG#QF4Rr`}qfjc--22hbx1TO$Ml`NM^DZ&p!Y| Coi@t= delta 214 zcmX>hbwY~QiIlBE+ZV2vCxC8x zDFP%m*RZ=WOWhI=337A}@ehi3@eFcx4)OH&i}&*n3h{{Ae1|K8kxdq;vPgEa7tcQc DHt;wi diff --git a/__pycache__/graph.cpython-37.pyc b/__pycache__/graph.cpython-37.pyc index 66a7a5ed6cbaa2c552a843c898d3de591aaa0e73..699e78171d9268e82f777cd4755bfd1c6303ee11 100644 GIT binary patch delta 19 ZcmZ3Xv_gr?iI%JHt zn~&+%ar0K*F>KS$yeCKWY0}QtNhLS_+-3p8mCy_b0dWVScS;Gdsm~xZMcz;dwnS_Q zUmwtZTgB=Ty-No4*>j(R_9WKWRIB;IBSU>eJYFK6C=oy5C5C)NhGIl)ZI8*1lROwE zMg;7QSmHkO1RS~G(P0ud7oprZOFm28x9f+B8d?z=swry4Cwy_HU* zvv0Lk20y490K#;t(;Qudo}*V`t^;Rdc`o08H9C8@`UoAa|I50GH^rutuWQ-|8ptdp z5><)E${gYXA`hsT@)FJqh(*Lj#1f*2SU{u@B}5vrf>=dd22^yphVyHPGGZNpKMo-L g!tc{m_>*sm4OA*&O6-+`CmNdN!< delta 143 zcmZ1{ypfmJiI!|aF#;981QC;1#W^*3Z?P67=B1}jmSWYO?89owTEqjCnmmKmm7V1lOKxI;;pCsJ mvXj?wI52Wee$U~-Ff3qL$WX$V#gxrdqyywJgLy0>ATbtk z5XqX&P^6Q>7>rQM22>jcRLhR6R)QggDVwz@EQJ|KB?nMt6S_*Ushrum3`I>TEJ%vE gfQr|kI{|9!n#tQ_7V&B@vM{OvF__+*D(l7q0N1HA!~g&Q delta 195 zcmX@?yxN)9iI= 0: + elif node.get_direction() == definitions.TRACTOR_DIRECTION_NORTH and node.get_y() * definitions.BLOCK_SIZE - definitions.BLOCK_SIZE >= 0: return "y - 1" - elif node.get_direction() == definitions.TRACTOR_DIRECTION_SOUTH and node.get_y() + definitions.BLOCK_SIZE < definitions.HEIGHT: + elif node.get_direction() == definitions.TRACTOR_DIRECTION_SOUTH and node.get_y() * definitions.BLOCK_SIZE + definitions.BLOCK_SIZE < definitions.HEIGHT: return "y + 1" - elif node.get_direction() == definitions.TRACTOR_DIRECTION_WEST and node.get_x() - definitions.BLOCK_SIZE >= 0: + elif node.get_direction() == definitions.TRACTOR_DIRECTION_WEST and node.get_x() * definitions.BLOCK_SIZE - definitions.BLOCK_SIZE >= 0: return "x - 1" else: return False