Upload files to ''
This commit is contained in:
parent
9029e8d192
commit
67b1aac125
10
program.py
10
program.py
@ -14,6 +14,7 @@ import easygui
|
|||||||
from neurons import Neurons
|
from neurons import Neurons
|
||||||
from whereDecision import WhereDecision
|
from whereDecision import WhereDecision
|
||||||
from Evencik import Evencik
|
from Evencik import Evencik
|
||||||
|
import pathlib
|
||||||
|
|
||||||
class MainWindow:
|
class MainWindow:
|
||||||
def __init__(self, szerokosc, wysokosc, kruche, latwopalne, radioaktywne, niebezpieczne):
|
def __init__(self, szerokosc, wysokosc, kruche, latwopalne, radioaktywne, niebezpieczne):
|
||||||
@ -75,7 +76,14 @@ class MainWindow:
|
|||||||
self.wheel.move(event, self.map)
|
self.wheel.move(event, self.map)
|
||||||
elif(event.type==pygame.MOUSEBUTTONDOWN):
|
elif(event.type==pygame.MOUSEBUTTONDOWN):
|
||||||
if (type(self.map[0][2]) == Floor):
|
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())
|
where = self.whereDecision.recognize(whatIsIt, self.regalsik())
|
||||||
self.map[0][2] = BoxOnTheFloor(self.screen, self.cell, 0, 2, Box())
|
self.map[0][2] = BoxOnTheFloor(self.screen, self.cell, 0, 2, Box())
|
||||||
star = AStar()
|
star = AStar()
|
||||||
|
Loading…
Reference in New Issue
Block a user