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

var game = {
    connect(callback){
        var token = getQueryVariable("token") || "8bc766ae05120ad091e8e52c29e23c10"
        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()
    },
    getRecordList(){
        api.getRecordList()
    },
    getOpenRecordList(){
        api.getOpenRecordList()
    }
}

export default game