From c30d6ffc5cb33127ae7bbc46c5b737fea17c9545 Mon Sep 17 00:00:00 2001 From: Adam Mikolajczak Date: Fri, 10 May 2024 11:21:15 +0200 Subject: [PATCH] feat: adding water tiles 1/3 of free tiles are now water. water.png obviously is a prototype (it's ugly). --- src/field.py | 1 + src/images/water.png | Bin 0 -> 6090 bytes src/tile.py | 7 ++++++- 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 src/images/water.png diff --git a/src/field.py b/src/field.py index 4c5cc9fd..f085b9ae 100644 --- a/src/field.py +++ b/src/field.py @@ -14,3 +14,4 @@ class Field: def draw(self, surface): self.tiles.draw(surface) self.tractor.draw(surface) + diff --git a/src/images/water.png b/src/images/water.png new file mode 100644 index 0000000000000000000000000000000000000000..82ecdff8277f726c7d7b79c1e2bf7430834f9431 GIT binary patch literal 6090 zcmY+Ic|25o`^QNo%2rBtk&sX!`^;@AkzKNc3887qHg?7&EwW}QySb%C_A+*ZY%})3 zXlTS>vNg6bVK8QX_1w?>di?%4=lpff>w0~z>w14a=ljaa!kC9!gqw|xjmPAskizJedc+ph{-E2P*&s_4(UAPNz+??zYLDdsw;>uk^0k>fPZO zdHT?JGoQN_wJ-%;ojU%y{?gsIQ?iFHiBu@f;b&3U`OZ%5 zz&6+r4{S(DG3m|4Hy7AN$?dJgl{G2M)Yw+tHp`n*VP(u7JNbOPOtV*d){~8Sx~t0N z$zlDyZmuzRI#;L8qg<)klN~i|_Gk0?)~j$?DOY1b*DuMJBrrQCVmTLNwww-gLf0pf zbk#qWD@gZU@3~f*Z6Skij@g6PUY~??PQ+Lyqb|b)NgVZC85aZI&b;JD*!}n(7+a|f zMs@MCJR87VR2epxCiL?FZYrSD!!80XwisAkqA~nMv1l~Qo1YXD8q}uSi&-^d)La4O zatB4(ky{Pmld|O81lR5ZeY+s`NgKOB0SbF{Z8LvaIRV8n*_Slft2d_B& zORMqZ4S_pFfKL13{0xJAkW!r>Mpo~IYwn4_?#n@p&D~)8ysTrhsaitEMG|CH?$l5X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*kKA#HCj0r2;lllvjdqhfBdNB>RR-Ilh+Zh)Lz)Si7X z{1`QM%wiyGD@%92t0R6O=mf6m^awjz?n^P_&6<|_Qn!wOTUZt6Lc#Ub?d6t_JLgvn z9Xo1586$c*net?BAP-Pc0@$JLRTdYnDlAFbd*S-SzFG4*xkGE9$ohW+&QR-bW$m!(_zrmG&WvJ(;r8aQDp+vnHp{5JIswq2=-S!>l36<#s0M-|+W`I_H2qmC=nf z@<)_L(~|~hkOo6-E=&yWA+{qdBcWzGc_rj(S#%5GIZPHJar$RbWQu&4D$9949y#`y z6Efnk%?x?o>O(|8Qyns%VJx=?aai(#?WgS?B=xktcm-lWV_IiYz-jMAghC3Rmse*&Z6jPMk~R>aW3CdQ|PFiCSm8CEtnWgyRyDcizx$DksS# z%aNk%arZcgr8aG0<9wY^^eyl8sUtM5h^YRzYO5a}l6d<{t&~#~`CgEHav{3tqtw4A zu&iEfrU93b#V|Y!@sNw4GYt{WyD@@KjNw-=^B5csp?a|gJqTsgF_kgJ2e&UyuUYqn z*77&R7p?Un@0AGQDni)vjd*BKe|$#_{ZZD*SBgh+Sv&SaEwPtxJ!rnN_Q5KsK5Bzk zsY>C9(#V_WDbown9rs>cb?Klg$Jy-w!c$&$<~+9I4Ps}tlR*>FH0NG_y|drwj@aeh z$LFccpY#MUU*x?+FyDn42-hOYu=F)uRhx_T-4bM!@CplGkfVB14&*dVb@RMg!5sU0 z7Um%vk9_2=pYnY>>xgxIfk3uO(&no0%E-!I(I|$bAn93h*5u&w!QPAt!6?cn07#feHqD>YL)W!hf_cG6bMa>`mK9*xMxo%-p JVQ}y1{{c;)b@~7R literal 0 HcmV?d00001 diff --git a/src/tile.py b/src/tile.py index 24d3c2e7..6fe6c322 100644 --- a/src/tile.py +++ b/src/tile.py @@ -21,7 +21,10 @@ class Tile(pygame.sprite.Sprite): random_vegetable = vegetables[random.randint(0, len(vegetables)-1)]['Nazwa_warzywa'] self.set_type(random_vegetable) else: - self.set_type('grass') + if random.randint(1, 10) % 3 == 0: + self.set_type('water') + else: + self.set_type('grass') self.faza = 'posadzono' @@ -36,6 +39,8 @@ class Tile(pygame.sprite.Sprite): self.type = type if self.type == 'grass': image_path = "images/grass.png" + elif self.type == 'water': + image_path = "images/water.png" else: image_path = f"images/vegetables/{self.type}.png" if not os.path.exists(image_path):