forked from s444399/AI
Upload files to ''
This commit is contained in:
parent
9029e8d192
commit
67b1aac125
12
program.py
12
program.py
@ -14,6 +14,7 @@ import easygui
|
||||
from neurons import Neurons
|
||||
from whereDecision import WhereDecision
|
||||
from Evencik import Evencik
|
||||
import pathlib
|
||||
|
||||
class MainWindow:
|
||||
def __init__(self, szerokosc, wysokosc, kruche, latwopalne, radioaktywne, niebezpieczne):
|
||||
@ -75,7 +76,14 @@ class MainWindow:
|
||||
self.wheel.move(event, self.map)
|
||||
elif(event.type==pygame.MOUSEBUTTONDOWN):
|
||||
if (type(self.map[0][2]) == Floor):
|
||||
whatIsIt = self.neurons.whatIsIt(easygui.fileopenbox("Wybierz zdjęcie paczki", "Wybierz zdjęcie paczki", filetypes = [["*.jpg", "*.jpeg", "*.png", "Pliki graficzne"]]))
|
||||
meh = easygui.fileopenbox("Wybierz zdjęcie paczki", "Wybierz zdjęcie paczki", filetypes = [["*.jpg", "*.jpeg", "*.png", "Pliki graficzne"]])
|
||||
if meh is None:
|
||||
return
|
||||
while pathlib.Path(meh).suffix!=".jpg" and pathlib.Path(meh).suffix!=".jpeg" and pathlib.Path(meh).suffix!=".png":
|
||||
meh = easygui.fileopenbox("Wybierz zdjęcie paczki", "Wybierz zdjęcie paczki", filetypes = [["*.jpg", "*.jpeg", "*.png", "Pliki graficzne"]])
|
||||
if meh is None:
|
||||
return
|
||||
whatIsIt = self.neurons.whatIsIt(meh)
|
||||
where = self.whereDecision.recognize(whatIsIt, self.regalsik())
|
||||
self.map[0][2] = BoxOnTheFloor(self.screen, self.cell, 0, 2, Box())
|
||||
star = AStar()
|
||||
@ -143,4 +151,4 @@ class MainWindow:
|
||||
for regal in self.regals:
|
||||
if self.map[regal[0]][regal[1]].isOccupied()==False:
|
||||
tmp.append(regal)
|
||||
return tmp
|
||||
return tmp
|
||||
|
Loading…
Reference in New Issue
Block a user