AI-Snake-Game/run_game.py

34 lines
1008 B
Python

#!/usr/bin/env python3
import argparse
from src.game import Game
def main():
parser = argparse.ArgumentParser(description='Run AI Snake Game')
parser.add_argument('--test', action='store_true',
help='Run game in test mode (smaller window, faster speed)')
parser.add_argument('--debug', action='store_true',
help='Run game in debug mode (shows grid and additional info)')
parser.add_argument('--ai-only', action='store_true',
help='Start directly in AI mode (skips menu)')
args = parser.parse_args()
# Create game instance
game = Game()
# Apply test mode settings
if args.test:
game.width = 400
game.height = 300
game.block_size = 20
game.fps = 30
# Apply debug mode settings
if args.debug:
game.debug = True # Will need to add debug support to Game class
# Run the game
game.run()
if __name__ == "__main__":
main()