You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
500 B
23 lines
500 B
#!/usr/bin/env python3
|
|
# test_snake_game.py
|
|
"""测试贪吃蛇游戏"""
|
|
|
|
import sys
|
|
import os
|
|
|
|
# 添加项目根目录到Python路径
|
|
project_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|
sys.path.insert(0, project_root)
|
|
|
|
from PyQt5.QtWidgets import QApplication
|
|
from src.ui.snake_game import SnakeGameWindow
|
|
|
|
def main():
|
|
app = QApplication(sys.argv)
|
|
game_window = SnakeGameWindow()
|
|
game_window.show()
|
|
sys.exit(app.exec_())
|
|
|
|
if __name__ == '__main__':
|
|
main()
|