Skip to content

Add offline/practice mode #10

@aurbano

Description

@aurbano

When we made uabc generic we lost support for a practice mode, as uabc no longer has access to game engines.

Since game servers are just npm packages, we could have uabc pull the appropriate game server using npm install, and act as a client in order to play games locally.

The workflow would be:

  1. The user runs uabc in practice mode:
uabc --practice uttt -f "python player.py" "python random.py"
  1. uabc checks if the uttt game server is available (we need to ensure consistent package names for this obviously)
    a. If available, go to point 3.
    b. If not available, try running npm install {game}-game-server
    c. If that succeeds, go to 3.

  2. Start the game server locally, start the two players, and have them play with the game server. This is already the way tournaments are played, with the handoff mechanism, so uabc will just need to be aware of some extra protocol logic (mainly around matches)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions