From 31e9771ba0e9a164f5c94844ac959e747636412d Mon Sep 17 00:00:00 2001 From: Rbanh Date: Sun, 23 Feb 2025 12:41:06 -0500 Subject: [PATCH] Fix package structure and entry point --- setup.py | 2 +- src/__init__.py | 4 +++- run_game.py => src/cli.py | 5 ++--- 3 files changed, 6 insertions(+), 5 deletions(-) rename run_game.py => src/cli.py (93%) diff --git a/setup.py b/setup.py index b7d1ed1..155ce81 100644 --- a/setup.py +++ b/setup.py @@ -33,7 +33,7 @@ setup( }, entry_points={ "console_scripts": [ - "snake-game=run_game:main", + "snake-game=src.cli:main", ], }, ) \ No newline at end of file diff --git a/src/__init__.py b/src/__init__.py index d05a757..ad42af4 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -13,6 +13,7 @@ from src.game import Game, GameState from src.snake import Snake, Direction from src.food import Food from src.menu import Menu, GameMode, MenuItem +from src.cli import main as cli_main __version__ = '0.1.0' __author__ = 'Rbanh' @@ -26,5 +27,6 @@ __all__ = [ 'Food', 'Menu', 'GameMode', - 'MenuItem' + 'MenuItem', + 'cli_main' ] \ No newline at end of file diff --git a/run_game.py b/src/cli.py similarity index 93% rename from run_game.py rename to src/cli.py index 3455e9b..cc7c0d4 100644 --- a/run_game.py +++ b/src/cli.py @@ -1,8 +1,7 @@ -#!/usr/bin/env python3 """ -AI Snake Game Runner +AI Snake Game CLI -This script provides the entry point for running the AI Snake Game. +This module provides the command-line interface for running the AI Snake Game. It handles command-line arguments for different game modes and configurations. """