def create_page(self): Label(self, text='').pack() # 创建 飞机大战 的按钮 Button(self, text='飞机大战', command=lambda: ai.run_game()).pack(side=TOP, expand=YES, fill=BOTH, padx=4, pady=15, ipadx=20, ipady=10) # 创建 贪吃蛇 的按钮 Button(self, text='贪吃蛇').pack(side=BOTTOM, expand=YES, fill=BOTH, padx=4, pady=15, ipadx=20, ipady=10)
import pygame import alien_invasion alien_invasion.run_game()
from alien_invasion import run_game run_game()
def start_game(self): run_game(self.marker_img)
def begin_game(self): run_game()