From 1358ec3f7591c735f4ca4cf6e59ac0df5d04a8ee Mon Sep 17 00:00:00 2001 From: s463041 Date: Wed, 8 May 2024 19:45:19 +0200 Subject: [PATCH] added more costly squares --- .idea/Automatyczny_kelner.iml | 10 + .../inspectionProfiles/profiles_settings.xml | 6 + .idea/misc.xml | 4 + .idea/vcs.xml | 6 + .idea/workspace.xml | 239 ++++++++++++++++++ main.py | 17 +- 6 files changed, 281 insertions(+), 1 deletion(-) create mode 100644 .idea/Automatyczny_kelner.iml create mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/vcs.xml create mode 100644 .idea/workspace.xml diff --git a/.idea/Automatyczny_kelner.iml b/.idea/Automatyczny_kelner.iml new file mode 100644 index 0000000..aad402c --- /dev/null +++ b/.idea/Automatyczny_kelner.iml @@ -0,0 +1,10 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..dc9ea49 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..2347389 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,239 @@ + + + + + + + + + + + + + + + + + + + + { + "keyToString": { + "RunOnceActivity.OpenProjectViewOnStart": "true", + "RunOnceActivity.ShowReadmeOnStart": "true", + "WebServerToolWindowFactoryState": "false", + "last_opened_file_path": "/home/students/s463041/semestr4/Automatyczny_kelner", + "node.js.detected.package.eslint": "true", + "node.js.detected.package.tslint": "true", + "node.js.selected.package.eslint": "(autodetect)", + "node.js.selected.package.tslint": "(autodetect)", + "settings.editor.selected.configurable": "PyConsoleConfigurable.Python Console", + "vue.rearranger.settings.migration": "true" + } +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1712172970366 + + + + + + + + + \ No newline at end of file diff --git a/main.py b/main.py index b1103a0..cffb9dc 100644 --- a/main.py +++ b/main.py @@ -193,12 +193,27 @@ def kuchnia(x, y): def menu(x, y): screen.blit(menuImg, (x * blockSize, y * blockSize)) +kosztNormalnejPlytki = 1 +kosztDrozszejPlytki = 5 + +def kosztownaPlytka(x, y): + if x > 60*4 and x < 60*7 and y < 60*9: + return True + if x > 60*12 and x < 60*16 and y > 60*5: + return True + if x > 60*20 and y < 60*9 and y > 60*3: + return True + return False + def wypiszOkno(): screen.fill((0, 0, 0)) for x in range(0, width, blockSize): for y in range(0, height, blockSize): rect = pygame.Rect(x, y, blockSize, blockSize) - pygame.draw.rect(screen, (200, 200, 200), rect, 1) #-------------Wypisz kratÄ™ -TA + if kosztownaPlytka(x, y): + pygame.draw.rect(screen, (200, 0, 0), rect, 1) + else: + pygame.draw.rect(screen, (200, 200, 200), rect, 1) #-------------Wypisz kratÄ™ -TA run = True