2020-05-08 12:01:57 +02:00
|
|
|
import field
|
|
|
|
|
|
|
|
tabela_wystapien = [0,0,0,0]
|
|
|
|
|
2020-05-03 17:13:59 +02:00
|
|
|
class main():
|
2020-05-08 12:01:57 +02:00
|
|
|
|
2020-05-03 17:13:59 +02:00
|
|
|
def __init__(self,traktor,field,ui,path):
|
|
|
|
self.traktor = traktor
|
|
|
|
self.field = field
|
|
|
|
self.ui = ui
|
|
|
|
self.path = path
|
|
|
|
|
|
|
|
def main(self):
|
2020-05-08 12:01:57 +02:00
|
|
|
for i in self.field.field_matrix:
|
|
|
|
for j in i:
|
|
|
|
if j == 1 or j == 3 or j == 5 or j == 7: #zliczanie zachwaszczonych pól
|
|
|
|
tabela_wystapien[0] = tabela_wystapien[0] + 1
|
|
|
|
if j == 1 or j == 2 or j == 3: #zliczanie nienawodnionych pól
|
|
|
|
tabela_wystapien[1] = tabela_wystapien[1] + 1
|
|
|
|
elif j == 4: #zliczanie pól gotowych do zasadzenia
|
|
|
|
tabela_wystapien[2] = tabela_wystapien[2] + 1
|
|
|
|
elif j == 8: #zliczanie pól gotowych do zbiorów
|
|
|
|
tabela_wystapien[3] = tabela_wystapien[3] + 1
|
|
|
|
else:
|
|
|
|
pass
|
|
|
|
print(j, end=" ")
|
|
|
|
print("")
|
|
|
|
print("###################")
|
|
|
|
print(tabela_wystapien)
|