init
This commit is contained in:
commit
f3e79af444
22 changed files with 1798 additions and 0 deletions
31
marvin_sw_text_adventure/cli/game.py
Normal file
31
marvin_sw_text_adventure/cli/game.py
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
from rich.console import Console
|
||||
import typer
|
||||
|
||||
from marvin_sw_text_adventure.cli.common import verbose_callback
|
||||
from marvin_sw_text_adventure.game import game as game_run
|
||||
|
||||
game_app = typer.Typer()
|
||||
|
||||
|
||||
@game_app.callback()
|
||||
def game(
|
||||
verbose: bool = typer.Option(
|
||||
False,
|
||||
callback=verbose_callback,
|
||||
help="show the log messages",
|
||||
),
|
||||
):
|
||||
"game cli"
|
||||
|
||||
|
||||
@game_app.command()
|
||||
def run(
|
||||
verbose: bool = typer.Option(
|
||||
False,
|
||||
callback=verbose_callback,
|
||||
help="show the log messages",
|
||||
),
|
||||
):
|
||||
from marvin_sw_text_adventure.console import console
|
||||
console.log("Starting game")
|
||||
game_run()
|
||||
Loading…
Add table
Add a link
Reference in a new issue