Skip to content

CLI module

Provide functions to handle CLI start game.

This module allows the handle CLI start game

Examples:

>>> python -m console -X human -O human
>>> tictactoe -X human -O human

The module contains the following classes and functions: - main - Handle start game from CLI

main()

Handle start game from CLI

Source code in src\frontend\console\cli.py
18
19
20
21
22
def main() -> None:
    """Handle start game from CLI
    """
    player1, player2, starting_mark = parse_args()
    TicTacToe(player1, player2, ConsoleRenderer()).play(starting_mark)