From 7719dfdc4e903cf0c9bdf80e5761c2b4bf202b3d Mon Sep 17 00:00:00 2001 From: eugenep Date: Tue, 22 Jun 2021 20:57:34 +0200 Subject: [PATCH] misc changes Co-authored-by: Marcin Matoga Co-authored-by: Sebastian Piotrowski Co-authored-by: Ladislaus3III --- Looper_maps/mine1_map | 7 +++++++ Looper_maps/mine2_map | 7 +++++++ Looper_maps/mine3_map | 7 +++++++ Looper_maps/mine4_map | 7 +++++++ Looper_maps/start_map | 7 +++++++ main.py | 31 +++++++++++++++++++++++-------- 6 files changed, 58 insertions(+), 8 deletions(-) create mode 100644 Looper_maps/mine1_map create mode 100644 Looper_maps/mine2_map create mode 100644 Looper_maps/mine3_map create mode 100644 Looper_maps/mine4_map create mode 100644 Looper_maps/start_map diff --git a/Looper_maps/mine1_map b/Looper_maps/mine1_map new file mode 100644 index 0000000..2e17495 --- /dev/null +++ b/Looper_maps/mine1_map @@ -0,0 +1,7 @@ +....... +ppp.... +pvpp... +..#.... +...#... +....ppp +.p.p... \ No newline at end of file diff --git a/Looper_maps/mine2_map b/Looper_maps/mine2_map new file mode 100644 index 0000000..7c60510 --- /dev/null +++ b/Looper_maps/mine2_map @@ -0,0 +1,7 @@ +....... +ppp.... +p.pp... +..#>... +...#... +....ppp +.p.p... \ No newline at end of file diff --git a/Looper_maps/mine3_map b/Looper_maps/mine3_map new file mode 100644 index 0000000..1f90cf4 --- /dev/null +++ b/Looper_maps/mine3_map @@ -0,0 +1,7 @@ +......< +ppp.... +p.pp... +..#.... +...#... +....ppp +.p.p... \ No newline at end of file diff --git a/Looper_maps/mine4_map b/Looper_maps/mine4_map new file mode 100644 index 0000000..21a3b7e --- /dev/null +++ b/Looper_maps/mine4_map @@ -0,0 +1,7 @@ +....... +ppp.... +p.pp... +..#.... +...#... +....ppp +^p.p... \ No newline at end of file diff --git a/Looper_maps/start_map b/Looper_maps/start_map new file mode 100644 index 0000000..a9db1de --- /dev/null +++ b/Looper_maps/start_map @@ -0,0 +1,7 @@ +>...... +ppp.... +p.pp... +..#.... +...#... +....ppp +.p.p... \ No newline at end of file diff --git a/main.py b/main.py index 21ebbe5..7b33b1e 100644 --- a/main.py +++ b/main.py @@ -164,16 +164,31 @@ class Game: #genetic_lib_runner = GeneticalWithLib() #genetic_lib_runner.run() self.wentyl_bezpieczenstwa = 1 + if event.key == pg.K_F10 and self.wentyl_bezpieczenstwa == 0: + self.player.ai_mode = "tree" + self.player.check_bomb() + self.wentyl_bezpieczenstwa = 1 + if event.type == pg.KEYUP: + if event.key == pg.K_F2: + self.wentyl_bezpieczenstwa = 0 + if event.key == pg.K_F3: + self.wentyl_bezpieczenstwa = 0 + if event.key == pg.K_F4: + self.wentyl_bezpieczenstwa = 0 + if event.key == pg.K_F5: + self.wentyl_bezpieczenstwa = 0 + if event.key == pg.K_F6: + self.wentyl_bezpieczenstwa = 0 + if event.key == pg.K_F7: + self.wentyl_bezpieczenstwa = 0 + if event.key == pg.K_F8: + self.wentyl_bezpieczenstwa = 0 + if event.key == pg.K_F9: + self.wentyl_bezpieczenstwa = 0 + if event.key == pg.K_F10: + self.wentyl_bezpieczenstwa = 0 - - - - - - - - def graph_move(self, moves): for i in moves: