import { ServerGame } from "../../types/types" ; import { RocketcrabMode } from "../../types/enums" ; const game = { id : "coolgame" , name : "Cool Game Online" , author : "John Doe" , basedOn : { game : "Cool Game" , author : "Don Joe" , link : "https://link.com" , bggId : 123456789 , } , description : "A really, really, really cool game." , displayUrlText : "coolgame.com" , displayUrlHref : "https://coolgameonline.com" , donationUrlText : "Support John on Patreon!" , donationUrlHref : "https://www.patreon.gov/johndoe" , guideId : "coolgame" , guideUrl : "https://coolgameonline.com/rules" , pictures : [ "https://i.imgur.com/abcd.png" , "https://i.imgur.com/efgh.png" ] , category : [ "medium" , "drawing" ] , players : "4-9" , showOn : [ RocketcrabMode . MAIN , RocketcrabMode . KIDS ] , minPlayers : 1 , maxPlayers : 6 , connectToGame : async ( ) => { const res = await fetch ( "https://coolgameonline.com/api/new" ) ; const jsonRes = await res . json ( ) ; return { player : { url : "https://coolgameonline.com/room/" + jsonRes . code , customQueryParams : { foo : "bar" , baz : "qux" , rocketcrab : "haha" , } , afterQueryParams : "#foo" , } , host : { url : "https://coolgameonline.com/room/" + jsonRes . code + "/host" , customQueryParams : { } , afterQueryParams : "" , } , } ; } , renameParams : { rocketcrab : "boosterfish" , name : "nickname" , ishost : "admin" , } , } ; export default game ;