Update README.md

This commit is contained in:
sxiii 2019-12-01 05:56:47 +01:00
parent 3fdb385ad9
commit 89037034cf
1 changed files with 14 additions and 8 deletions

View File

@ -15,36 +15,42 @@ the project name might change later.
* Register * Register
* List challenges - have fun! * List challenges - have fun!
### How to play (for instance on Nico's notebook) ### How to play (for instance on sxiii's laptop)
* Note: here HTTPie is used; can be replaced by curl or any other http tool
* Note2: example with localhost [::] is ipv6 localhost representation
0. Try to access the game server without any argument
```
http [::]:5002
```
1. Register: send a POST request with your username 1. Register: send a POST request with your username
``` ```
curl -d user=nico http://nico.ungleich.cloud:5002/register http POST [::]:5002/register user=sxiii
``` ```
2. Get challenges 2. Get challenges
``` ```
curl http://nico.ungleich.cloud:5002/challenge http [::]:5002/challenge
``` ```
3. Get a challenge description 3. Get a challenge description
``` ```
curl http://nico.ungleich.cloud:5002/challenge/registernet http [::]:5002/challenge/RegisterNet
``` ```
4. Solve a challenge 4. Solve a challenge
``` ```
curl -d user=nico -d 2a0a:e5c0:101::/64 http://nico.ungleich.cloud:5002/challenge/RegisterNet http POST [::]:5002/challenge/RegisterNet 'user=sxiii' 'network=2a0a:e5c0:101::/64'
``` ```
5. Get high score 5. Get high score
``` ```
curl http://nico.ungleich.cloud:5002/highscore http POST [::]:5002/points 'user=sxiii'
``` ```
@ -94,7 +100,7 @@ The base for building games is:
Tested packages @ Ubuntu 18.04.3 Tested packages @ Ubuntu 18.04.3
* etcd * etcd3 (important, version 3)
* python3-etcd * python3-etcd
* python3-flask * python3-flask
* python3-flask-restful * python3-flask-restful