Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add offline/practice mode #10

Open
aurbano opened this issue Sep 2, 2019 · 0 comments · May be fixed by #11
Open

Add offline/practice mode #10

aurbano opened this issue Sep 2, 2019 · 0 comments · May be fixed by #11

Comments

@aurbano
Copy link
Member

aurbano commented Sep 2, 2019

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)

@aurbano aurbano closed this as completed Sep 2, 2019
@aurbano aurbano reopened this Sep 2, 2019
@aurbano aurbano linked a pull request Sep 2, 2019 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant