From 540a9b952dd61dc80990e90dac9e3a9675f2a432 Mon Sep 17 00:00:00 2001 From: Michal Kijowski Date: Sun, 5 Apr 2020 15:37:45 +0000 Subject: [PATCH] =?UTF-8?q?Usu=C5=84=20'program.py'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- program.py | 41 ----------------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 program.py diff --git a/program.py b/program.py deleted file mode 100644 index 9222f95..0000000 --- a/program.py +++ /dev/null @@ -1,41 +0,0 @@ -import pygame -from os import sys -from generate import Generate -from floor import Floor -from wall import Wall -from shelf import Shelf -from wheelchair import Wheelchair - -class MainWindow: - def __init__(self, szerokosc, wysokosc, kruche, latwopalne, radioaktywne, niebezpieczne): - #config - self.cell = 50 - #init - pygame.init() - pygame.display.set_caption('Inteligentny wózek widłowy') - self.map = Generate.generate(szerokosc+2, wysokosc+2, kruche, latwopalne, radioaktywne, niebezpieczne) - self.screen = pygame.display.set_mode((((szerokosc+2)*self.cell), ((wysokosc+2)*self.cell))) - #create - for i in range(len(self.map)): - for j in range(len(self.map[i])): - if (self.map[i][j]==1): - self.map[i][j] = Wall(self.screen, self.cell, i, j) - elif (self.map[i][j]==2): - self.map[i][j] = Floor(self.screen, self.cell, i, j) - else: - self.map[i][j] = Shelf(self.screen, self.cell, i, j, (self.map[i][j]-3)%4, (self.map[i][j]-3)//4) - #loop - while True: - self.events() - self.draw() - - def events(self): - for event in pygame.event.get(): - if(event.type==pygame.QUIT): - sys.exit() - def draw(self): - self.screen.fill((255,255,255)) - for i in range(len(self.map)): - for j in range(len(self.map[i])): - self.map[i][j].draw() - pygame.display.flip() \ No newline at end of file