import api from "../../static/api"

var game = {
    connect(callback){
        var token = getQueryVariable("token") || "8bc766ae05120ad091e8e52c29e23c6e"
        api.init(token, callback)
        api.startWS()
    },
    joinRoom(roomID, chairID) {
        api.joinRoom(roomID, chairID)
    },
    leaveRoom() {
        api.leaveRoom()
    },
    createRoom() {
        api.createRoom(1, "123456")
    },
    ready(){
        api.ready()
    },
    unready(){
        api.unready()
    },
    chooseMaster(){
        api.chooseMaster()
    },
    chooseMul(){
        api.chooseMul()
    },
    openCard(){
        api.openCard()
    }
}

export default game