From 01c9a2549c4278d5a843e685a4bb9e12f7cad76d Mon Sep 17 00:00:00 2001 From: Vincents Xun Date: Fri, 26 Apr 2024 06:11:30 +0000 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20ja?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ja | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ja b/ja index 8145ecf..695979f 100644 --- a/ja +++ b/ja @@ -150,6 +150,11 @@ while running: print("You collected a cheese! Total cheese count:", player.cheese_count) cheese.rect.topleft = (-32, -32) # 移除奶酪 + # 如果玩家收集了10个奶酪,则结束游戏 + if player.cheese_count >= 10: + print("Congratulations! You collected 10 cheeses!") + running = False + screen.fill(BLUE) draw_maze(maze) player.draw(screen) @@ -158,3 +163,4 @@ while running: pygame.quit() sys.exit() +