Skip to content

Use websockets to start cab in tournament mode #51

@cscorley

Description

@cscorley

On connect, it may need some validation. The tournament mode starts with this message:
![k[connect],v[{"name":"1","isGameMachine":false}]]!

Responds with: ![k[connected],v[9]]!

The value in the response seems to vary.


Login verifies over plain-text (lol)

![k[adminlogin],v[beegame]]!

Response: ![k[loginevent],v[1]]!


It will then ping status every 5 seconds (this is likely not needed):
![k[im alive],v[1]]!


Getting current tournament status

![k[get],v[tournamentstatus]]!

Response: ![k[tournamentstatus],v[0,1]]!


Starts a round robin

![k[tstart],v[{"format":"r","name":"testatest","location":"test","teams":["test1","test2"],"bestOf":"1,1,1","swissround":1,"warmup":"60"}]]!

It should respond with the game state:
![k[bracket],v[{"tournament_name":"testatest","tournament_location":"test","format":"r","concluded":false,"stream_url":"","brackets":[{"bracket_type":"r","rounds":[{"round_num":0,"sets":[{"id":1,"best_of":1,"on_machine_name":"","start_time":"","teams":[{"name":"test1","score":0},{"name":"test2","score":0}],"victory_types":[],"match_data_id":[]}]}]}],"standings":[{"name":"test1","point":0,"win":0,"loss":0},{"name":"test2","point":0,"win":0,"loss":0}]}]]!

and also a start status:

![k[tstart],v[{"start":"True","format":"r","tournamentname":"testatest","message":"Can not connect to Database, bracket will only be locally saved."}]]!


Different formats:

{r:"round robin", w:"swiss", d:"double elimination", s:"single elimination", m:"manual"};

Manual sends this: ![k[tstart],v[{"format":"m","name":"manualtesting","location":"","teams":["team 1","team 2","team 3"],"bestOf":"1,1,1","swissround":2,"warmup":"60"}]]!


This ends tournament: ![k[restarttourney],v[]]!

It should respond with: ![k[restarttourney],v[r,testatest,test,1,1,1,test1,test2]]!


Disconnect messages are sent as well:

![k[Disconnect],v[]]!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions