From 49388d4102abd92826b941816ca852c33bdf0cf0 Mon Sep 17 00:00:00 2001 From: yanshaoting Date: Fri, 12 Apr 2024 22:48:03 +0800 Subject: [PATCH] map set --- maps/001.json | 4 ++-- maps/002.json | 4 ++-- maps/003.json | 8 ++++---- maps/004.json | 14 +++++++------- maps/005.json | 12 ++++++------ maps/006.json | 12 ++++++------ maps/007.json | 12 ++++++------ maps/008.json | 2 +- src/game.py | 7 +------ 9 files changed, 35 insertions(+), 40 deletions(-) diff --git a/maps/001.json b/maps/001.json index 0add4b6..10c7ff0 100644 --- a/maps/001.json +++ b/maps/001.json @@ -3,8 +3,8 @@ "playground_size_w":400, "playground_size_h":400, "score_to_pass": 10, - "food_1": 5, - "food_1_max": 5, + "food_1": 4, + "food_1_max": 4, "food_2": 0, "food_2_max": 0, "food_3": 0, diff --git a/maps/002.json b/maps/002.json index 16d401c..b349911 100644 --- a/maps/002.json +++ b/maps/002.json @@ -1,8 +1,8 @@ { - "time_to_play": 350, + "time_to_play": 400, "playground_size_w":400, "playground_size_h":400, - "score_to_pass": 20, + "score_to_pass": 30, "food_1": 5, "food_1_max": 5, "food_2": 1, diff --git a/maps/003.json b/maps/003.json index 98b079d..24e54c4 100644 --- a/maps/003.json +++ b/maps/003.json @@ -1,11 +1,11 @@ { - "time_to_play": 500, + "time_to_play": 600, "playground_size_w":400, "playground_size_h":400, - "score_to_pass": 30, + "score_to_pass": 50, "food_1": 4, - "food_1_max": 4, - "food_2": 2, + "food_1_max": 5, + "food_2": 1, "food_2_max": 2, "food_3": 0, "food_3_max": 0, diff --git a/maps/004.json b/maps/004.json index 9533213..6b3b2bc 100644 --- a/maps/004.json +++ b/maps/004.json @@ -2,17 +2,17 @@ "time_to_play": 600, "playground_size_w":400, "playground_size_h":400, - "score_to_pass": 40, - "food_1": 8, + "score_to_pass": 80, + "food_1": 4, "food_1_max": 8, - "food_2": 2, - "food_2_max": 2, + "food_2": 1, + "food_2_max": 3, "food_3": 0, "food_3_max": 0, - "garbage_1": 4, + "garbage_1": 2, "garbage_1_max": 4, - "garbage_2": 0, - "garbage_2_max": 0, + "garbage_2": 1, + "garbage_2_max": 1, "garbage_3": 0, "garbage_3_max": 0 } \ No newline at end of file diff --git a/maps/005.json b/maps/005.json index 518417a..7b3e39c 100644 --- a/maps/005.json +++ b/maps/005.json @@ -2,17 +2,17 @@ "time_to_play": 800, "playground_size_w":400, "playground_size_h":400, - "score_to_pass": 50, - "food_1": 8, - "food_1_max": 8, - "food_2": 4, + "score_to_pass": 80, + "food_1": 3, + "food_1_max": 6, + "food_2": 2, "food_2_max": 4, "food_3": 0, "food_3_max": 0, "garbage_1": 3, - "garbage_1_max": 3, + "garbage_1_max": 5, "garbage_2": 1, - "garbage_2_max": 1, + "garbage_2_max": 2, "garbage_3": 0, "garbage_3_max": 0 } \ No newline at end of file diff --git a/maps/006.json b/maps/006.json index 2228f6a..7b6244d 100644 --- a/maps/006.json +++ b/maps/006.json @@ -2,17 +2,17 @@ "time_to_play": 1000, "playground_size_w":400, "playground_size_h":400, - "score_to_pass": 60, - "food_1": 8, + "score_to_pass": 80, + "food_1": 4, "food_1_max": 8, - "food_2": 4, + "food_2": 2, "food_2_max": 4, "food_3": 0, "food_3_max": 0, - "garbage_1": 5, - "garbage_1_max": 5, + "garbage_1": 4, + "garbage_1_max": 6, "garbage_2": 2, - "garbage_2_max": 2, + "garbage_2_max": 3, "garbage_3": 0, "garbage_3_max": 0 } \ No newline at end of file diff --git a/maps/007.json b/maps/007.json index cb1a762..b1f8bd4 100644 --- a/maps/007.json +++ b/maps/007.json @@ -2,17 +2,17 @@ "time_to_play": 1200, "playground_size_w":500, "playground_size_h":500, - "score_to_pass": 70, - "food_1": 8, + "score_to_pass": 90, + "food_1": 3, "food_1_max": 8, - "food_2": 4, + "food_2": 1, "food_2_max": 4, - "food_3": 2, + "food_3": 1, "food_3_max": 2, "garbage_1": 4, - "garbage_1_max": 4, + "garbage_1_max": 6, "garbage_2": 2, - "garbage_2_max": 2, + "garbage_2_max": 3, "garbage_3": 0, "garbage_3_max": 0 } \ No newline at end of file diff --git a/maps/008.json b/maps/008.json index 817f99d..ad95bc3 100644 --- a/maps/008.json +++ b/maps/008.json @@ -2,7 +2,7 @@ "time_to_play": 1400, "playground_size_w":650, "playground_size_h":600, - "score_to_pass": 80, + "score_to_pass": 100, "food_1": 6, "food_1_max": 10, "food_2": 4, diff --git a/src/game.py b/src/game.py index 823aa92..3b738f3 100644 --- a/src/game.py +++ b/src/game.py @@ -55,6 +55,7 @@ class SwimmingSquid(PaiaGame): self._winner = [] self._foods_num = [] self._foods_max_num = [] + self._add_score = {"1P":0, "2P":0} self._init_game() @@ -156,7 +157,6 @@ class SwimmingSquid(PaiaGame): hits = pygame.sprite.spritecollide(self.squid1, self.foods, True) if hits: for food in hits: - # self.ball.score += food.score # growth play special sound self.squid1.eat_food_and_change_level_and_play_sound(food, self.sound_controller) self._create_foods(food.__class__, 1) @@ -167,7 +167,6 @@ class SwimmingSquid(PaiaGame): hits = pygame.sprite.spritecollide(self.squid2, self.foods, True) if hits: for food in hits: - # self.ball.score += food.score # growth play special sound self.squid2.eat_food_and_change_level_and_play_sound(food, self.sound_controller) self._create_foods(food.__class__, 1) @@ -383,10 +382,6 @@ class SwimmingSquid(PaiaGame): ] game_obj_list.extend(foods_data) backgrounds = [ - # create_image_view_data("background", 0, 0, WIDTH, HEIGHT), - # create_rect_view_data( - # "playground", self.playground.x, self.playground.y, - # self.playground.w, self.playground.h, PG_COLOR) create_image_view_data( 'bg', self.playground.x, self.playground.y, self.playground.w, self.playground.h)