更新 ja

main
Vincents Xun 2024-04-26 06:11:30 +00:00
parent c4d9210499
commit 01c9a2549c
1 changed files with 6 additions and 0 deletions

6
ja
View File

@ -150,6 +150,11 @@ while running:
print("You collected a cheese! Total cheese count:", player.cheese_count) print("You collected a cheese! Total cheese count:", player.cheese_count)
cheese.rect.topleft = (-32, -32) # 移除奶酪 cheese.rect.topleft = (-32, -32) # 移除奶酪
# 如果玩家收集了10个奶酪则结束游戏
if player.cheese_count >= 10:
print("Congratulations! You collected 10 cheeses!")
running = False
screen.fill(BLUE) screen.fill(BLUE)
draw_maze(maze) draw_maze(maze)
player.draw(screen) player.draw(screen)
@ -158,3 +163,4 @@ while running:
pygame.quit() pygame.quit()
sys.exit() sys.exit()