{"version":3,"sources":["components/NavMenu.tsx","components/Footer.tsx","components/Layout.tsx","Sounds.ts","components/Home.tsx","components/About.tsx","components/Roster.tsx","components/GameStartButton.tsx","components/GameTimer.tsx","components/GameHeader.tsx","components/GameSubmitForm.tsx","components/GameVotingForm.tsx","components/GameRoundSummary.tsx","components/GameScoreBoard.tsx","components/GameRules.tsx","components/Game.tsx","components/GameShell.tsx","components/Rules.tsx","App.tsx","serviceWorker.ts","index.tsx"],"names":["NavMenu","props","toggleNavbar","bind","state","collapsed","this","setState","Navbar","bg","to","Brand","Toggle","aria-controls","Collapse","id","Nav","className","Link","Component","displayName","name","Footer","href","Layout","Container","children","sndClick","Howl","src","sndWin","sndLose","playClick","play","HomeButton","history","useHistory","Button","onClick","Axios","post","rounds","mode","then","resp","push","data","catch","err","console","log","variant","JoinButton","disabled","code","Home","intervalId","gameCode","gameCodeExists","gameCount","setRounds","setMode","setGameCode","timer","evt","Number","target","value","setInterval","loadGameCount","clearInterval","get","r","toUpperCase","replace","length","playerId","Row","Col","style","textAlign","alt","playerName","md","Form","onSubmit","preventDefault","Group","Label","Control","as","onChange","type","isInvalid","maxLength","minLength","placeholder","Feedback","About","Roster","statusMap","inactiveMap","gameState","players","forEach","p","inactive","currentRound","submitted","voted","Table","striped","bordered","size","map","key","color","score","GameStartButton","startGame","gameId","GameTimer","remaining","rem","prevProps","prevState","snapshot","ProgressBar","undefined","now","total","label","Math","round","GameHeader","width","marginBottom","word","num","totalRounds","colSpan","remainingTime","totalTime","canStart","Alert","canSubmit","canVote","GameSubmitForm","definition","onDefChange","roundId","controlId","GameVotingForm","vote","definitionId","ListGroup","definitions","def","Item","ownDefinition","GameRoundSummary","d","player","votes","v","GameScoreBoard","firstPlaceScore","place","placeScore","backgroundColor","GameRules","Game","ws","error","onMessage","onSocketError","onSocketConnect","e","msg","JSON","parse","ws_uri","loc","window","location","protocol","host","encodeURIComponent","Spinner","animation","url","onConnect","onError","paddingBottom","GameShell","loading","hasJoined","nameIsAvailable","nameIsAvailableRunning","onNameUpdate","onJoin","substring","onSetName","Rules","App","localStorage","getItem","setName","setItem","exact","path","render","match","component","params","React","Boolean","hostname","ReactDOM","StrictMode","document","getElementById","navigator","serviceWorker","ready","registration","unregister","message"],"mappings":"kPAKaA,G,MAAb,kDAGE,WAAYC,GAAa,IAAD,8BACtB,cAAMA,IAEDC,aAAe,EAAKA,aAAaC,KAAlB,gBACpB,EAAKC,MAAQ,CACXC,WAAW,GALS,EAH1B,2DAaIC,KAAKC,SAAS,CACZF,WAAYC,KAAKF,MAAMC,cAd7B,+BAmBI,OACE,gCACE,kBAACG,EAAA,EAAD,CAAQC,GAAG,SACT,kBAAC,gBAAD,CAAeC,GAAG,KAChB,kBAACF,EAAA,EAAOG,MAAR,eAEF,kBAACH,EAAA,EAAOI,OAAR,CAAeC,gBAAc,qBAC7B,kBAACL,EAAA,EAAOM,SAAR,CAAiBC,GAAG,oBAClB,kBAACC,EAAA,EAAD,CAAKC,UAAU,WACb,kBAAC,gBAAD,CAAeP,GAAG,KAChB,kBAACM,EAAA,EAAIE,KAAL,cAEF,kBAAC,gBAAD,CAAeR,GAAG,UAChB,kBAACM,EAAA,EAAIE,KAAL,eAEF,kBAAC,gBAAD,CAAeR,GAAG,UAChB,kBAACM,EAAA,EAAIE,KAAL,uBAnChB,GAA6BC,cAAhBnB,EACJoB,YAAcpB,EAAQqB,KCJxB,IAAMC,EAAb,uKAEQ,OACI,6BACI,yBAAKL,UAAU,UACX,yBAAKA,UAAU,gBACX,yBAAKA,UAAU,sBAAf,2BAC4B,uBAAGM,KAAK,iCAAR,wBAPpD,GAA4BJ,aCGfK,EAAb,uKAEI,OACE,6BACE,kBAAC,EAAD,MACA,kBAACC,EAAA,EAAD,KACGnB,KAAKL,MAAMyB,UAEd,kBAAC,EAAD,WARR,GAA4BP,a,yDCFxBQ,EAAW,IAAIC,OAAK,CAACC,IAAK,CAAC,uBAC3BC,EAAS,IAAIF,OAAK,CAACC,IAAK,CAAC,qBACzBE,EA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nH,IAChC,kBAAC,IAAD,CAAOgH,KAAK,SAASG,UAAWV,KAChC,kBAAC,IAAD,CAAOO,KAAK,YAAYC,OAAQ,gBAAGC,EAAH,EAAGA,MAAH,OAC9B,kBAAC,EAAD,CAAW5F,OAAQ4F,EAAME,OAAOvM,GAAI6D,SAAU,EAAKxE,MAAMwE,SAAUM,WAAY,EAAK9E,MAAM8E,YAAc,GAAIwH,UAAW,EAAKK,eAXnG,SA/BrC,GAAyBQ,IAAMpM,WCCXqM,QACW,cAA7BjC,OAAOC,SAASiC,UAEe,UAA7BlC,OAAOC,SAASiC,UAEhBlC,OAAOC,SAASiC,SAASL,MACvB,2DCXNM,IAASP,OACP,kBAAC,IAAMQ,WAAP,KACE,kBAAC,GAAD,OAEFC,SAASC,eAAe,SDgIpB,kBAAmBC,WACrBA,UAAUC,cAAcC,MACrBrL,MAAK,SAAAsL,GACJA,EAAaC,gBAEdnL,OAAM,SAAA8H,GACL5H,QAAQ4H,MAAMA,EAAMsD,a","file":"static/js/main.3ecddfd9.chunk.js","sourcesContent":["import React, { Component } from 'react';\nimport { Navbar, Nav } from 'react-bootstrap';\nimport { LinkContainer } from 'react-router-bootstrap'\nimport './NavMenu.css';\n\nexport class NavMenu extends Component<{}, any> {\n static displayName = NavMenu.name;\n\n constructor(props: any) {\n super(props);\n\n this.toggleNavbar = this.toggleNavbar.bind(this);\n this.state = {\n collapsed: true\n };\n }\n\n toggleNavbar() {\n this.setState({\n collapsed: !this.state.collapsed\n });\n }\n\n render() {\n return (\n
\n \n \n Werdz\n \n \n \n \n \n \n
\n );\n }\n}\n","import React, { Component } from 'react';\n\nexport class Footer extends Component {\n render() {\n return (\n
\n
\n
\n
\n A silly game written by Jeff Clement\n
\n
\n
\n
\n );\n }\n}","import React, { Component } from 'react';\nimport { Container } from 'react-bootstrap';\nimport { NavMenu } from './NavMenu';\nimport { Footer } from './Footer';\n\nexport class Layout extends Component {\n render () {\n return (\n
\n \n \n {this.props.children}\n \n
\n );\n }\n}\n","\nimport {Howl} from 'howler';\n\nvar sndClick = new Howl({src: [\"/sounds/click.mp3\"]})\nvar sndWin = new Howl({src: [\"/sounds/win.mp3\"]})\nvar sndLose = new Howl({src: [\"/sounds/lose.mp3\"]})\n\nconst playClick = () => { sndClick.play()}\nconst playWin = () => { sndWin.play()}\nconst playLose = () => { sndLose.play()}\n\nexport {playClick, playWin, playLose}\n\n","import React, { Component } from 'react';\nimport Button from 'react-bootstrap/Button';\nimport Row from 'react-bootstrap/Row';\nimport Col from 'react-bootstrap/Col';\nimport Form from 'react-bootstrap/Form';\nimport { useHistory } from \"react-router-dom\";\nimport Axios from 'axios';\nimport { playClick } from '../Sounds';\n\nfunction HomeButton(props: { mode: number, rounds: number }) {\n let history = useHistory();\n return ();\n};\n\nfunction JoinButton(props: { disabled: boolean, code: string }) {\n let history = useHistory();\n return ();\n};\n\ninterface HomeProps {\n playerId: string\n playerName: string\n}\n\ninterface HomeState {\n rounds: number,\n mode : number,\n gameCode: string,\n gameCodeExists: boolean,\n gameCount: number,\n}\n\nexport class Home extends Component {\n intervalId: NodeJS.Timeout | null = null;\n\n constructor(props: HomeProps) {\n super(props)\n this.state = {\n rounds: 7,\n mode: 0,\n gameCode: \"\",\n gameCodeExists: false,\n gameCount: 0,\n }\n this.setRounds = this.setRounds.bind(this)\n this.setMode = this.setMode.bind(this)\n this.setGameCode = this.setGameCode.bind(this)\n this.timer = this.timer.bind(this)\n }\n\n setRounds(evt: any) {\n this.setState({\n rounds: Number(evt.target.value)\n })\n }\n\n setMode(evt: any) {\n this.setState({\n mode: Number(evt.target.value)\n })\n }\n\n componentDidMount() {\n this.intervalId = setInterval(this.timer, 10000);\n this.loadGameCount()\n }\n\n componentWillUnmount() {\n if (this.intervalId) {\n clearInterval(this.intervalId);\n }\n }\n\n loadGameCount() {\n Axios.get('/api/game/count', {}).then((r) => {\n this.setState({\n gameCount: r.data\n })\n })\n }\n\n timer() {\n this.loadGameCount()\n }\n\n setGameCode(evt: any) {\n var code = evt.target.value.toUpperCase().replace(/[^a-zA-Z0-9]/g, \"\");\n this.setState({\n gameCode: code\n })\n if (code.length === 5) {\n Axios.get(\"/api/game/\" + code + \"/exists\", {})\n .then((r: any) => {\n this.setState({\n gameCodeExists: r.data,\n })\n })\n } else {\n this.setState({\n gameCodeExists: false\n })\n }\n }\n\n render() {\n if (this.props.playerId) {\n return (\n
\n \n \n
\"title\"
\n

Hello, {this.props.playerName || \"Stranger!\"}

\n \n
\n \n \n
\n
\n Start a New Game\n
\n
\n
evt.preventDefault()}>\n \n Number of Rounds:\n \n \n \n \n \n \n \n Game Type:\n \n \n \n \n \n
\n \n
\n
\n
\n \n \n
\n
\n Join a Game {this.state.gameCount > 0 ? ({this.state.gameCount} active): null}\n
\n
\n
evt.preventDefault()}>\n \n Game Code:\n \n {this.state.gameCode && !this.state.gameCodeExists && this.state.gameCode.length !== 5 && Invalid game code}\n {this.state.gameCode && !this.state.gameCodeExists && this.state.gameCode.length === 5 && Game does not exist}\n \n
\n \n
\n
\n \n\n
\n
\n );\n }\n return

Loading

\n }\n}","import React, { Component } from 'react';\n\nexport class About extends Component {\n render() {\n return (\n
\n

About Werdz

\n\n

Werdz is an online word guessing game where you try and make up plausible definitions for escoteric words to fool your friends.

\n\n

Werdz was created during the COVID-19 isolation because I wanted more games that were fun to play with friends remotely.

\n\n

If you have questions, suggestions, bug reports, etc. please submit them to werdz@werdz.ca.

\n\n
\"title\"
\n\n
\n
\n Credits\n
\n
\n \n
\n
\n
\n );\n }\n}","import React, { Component } from 'react';\nimport Table from 'react-bootstrap/Table';\nimport { game } from '../models/game';\nimport { FaCheckCircle, FaUser, FaGhost } from 'react-icons/fa';\n\ninterface RosterProps {\n playerId: string\n gameState: game\n}\n\nexport class Roster extends Component {\n render() {\n let statusMap: { [id: string]: boolean } = {}\n let inactiveMap: { [id: string]: boolean } = {}\n\n this.props.gameState.players.forEach((p) => {\n inactiveMap[p.id] = p.inactive\n })\n\n if (this.props.gameState.state === 1) {\n if (this.props.gameState.currentRound.state === 0) {\n this.props.gameState.players.forEach((p) => {\n statusMap[p.id] = p.submitted\n })\n }\n if (this.props.gameState.currentRound.state === 1) {\n this.props.gameState.players.forEach((p) => {\n statusMap[p.id] = p.voted\n })\n }\n }\n\n return (\n \n \n \n \n \n {this.props.gameState.players.map((p: any) => {\n return (\n \n \n \n );\n })}\n \n
PlayerScore
\n {inactiveMap[p.id] ? : null }\n {this.props.playerId !== p.id && statusMap[p.id] ? : null}\n {this.props.playerId === p.id && !statusMap[p.id] ? : null}\n {this.props.playerId === p.id && statusMap[p.id] ? : null}\n {p.name}{p.score}
\n );\n }\n}","import React, { Component } from 'react';\nimport Button from 'react-bootstrap/Button';\nimport Axios from 'axios';\nimport { playClick } from '../Sounds';\n\ninterface GameStartButtonProps {\n gameId: string,\n}\n\nexport class GameStartButton extends Component {\n\n constructor(props: GameStartButtonProps) {\n super(props)\n\n this.startGame = this.startGame.bind(this)\n }\n\n startGame() {\n playClick()\n Axios.post(\"/api/game/\" + this.props.gameId + \"/start\", {\n }).then(() => {\n })\n }\n render() {\n return (\n
\n

Once all players are ready...

\n \n
\n );\n }\n}","import React, { Component } from 'react';\nimport ProgressBar from 'react-bootstrap/ProgressBar';\n\ninterface GameTimerProps {\n remaining: number,\n total: number,\n}\n\nexport class GameTimer extends Component {\n intervalId: NodeJS.Timeout | null = null;\n\n constructor(props: GameTimerProps) {\n super(props)\n this.state = {\n remaining: props.remaining,\n }\n this.timer = this.timer.bind(this);\n }\n\n componentDidMount() {\n this.intervalId = setInterval(this.timer, 100);\n }\n\n componentWillUnmount() {\n if (this.intervalId) {\n clearInterval(this.intervalId);\n }\n }\n\n timer() {\n let rem = this.state.remaining - 0.1;\n if (rem < 0) {\n rem = 0;\n }\n this.setState({\n remaining: rem\n })\n }\n\n componentDidUpdate(prevProps: GameTimerProps, prevState: any, snapshot: any) {\n if (prevProps.remaining !== this.props.remaining) {\n this.setState({\n remaining: this.props.remaining\n })\n }\n }\n\n render() {\n return (\n
\n {this.state.remaining > 0 &&\n \n }\n
\n );\n }\n}","import React, { Component } from 'react';\nimport Alert from 'react-bootstrap/Alert';\nimport { game } from '../models/game';\nimport { GameTimer } from './GameTimer';\n\ninterface GameHeaderProps {\n gameState: game,\n gameId: string,\n}\n\nexport class GameHeader extends Component {\n render() {\n\n return (\n
\n

Game {this.props.gameId}

\n {this.props.gameState.state === 1 &&\n \n \n \n \n \n \n
Current Word: {this.props.gameState.currentRound.word}
Round: {this.props.gameState.currentRound.num} of {this.props.gameState.totalRounds}
\n\n }\n {this.props.gameState.state === 0 && !this.props.gameState.canStart &&\n Not Started. Waiting for Players.\n }\n {this.props.gameState.state === 0 && this.props.gameState.canStart &&\n Ready to start!\n }\n {this.props.gameState.canSubmit &&\n Submit your definition for {this.props.gameState.currentRound.word}\n }\n {this.props.gameState.state === 1 && !this.props.gameState.canSubmit && this.props.gameState.currentRound.state === 0 && \n Waiting for other players to submit their definitions...\n }\n {this.props.gameState.canVote && this.props.gameState.mode === 0 &&\n Select the correct definition for {this.props.gameState.currentRound.word}\n }\n {this.props.gameState.canVote && this.props.gameState.mode === 1 &&\n Select the best definition for {this.props.gameState.currentRound.word}\n }\n {this.props.gameState.state === 1 && !this.props.gameState.canVote && this.props.gameState.currentRound.state === 1 && \n Waiting for other players to vote...\n }\n {this.props.gameState.state === 2 &&\n Game over man!\n }\n\n
\n );\n }\n}","import React, { Component } from 'react';\nimport Button from 'react-bootstrap/Button';\nimport Form from 'react-bootstrap/Form';\nimport Axios from 'axios';\nimport { playClick } from '../Sounds';\n\ninterface GameSubmitFormProps {\n gameId: string,\n roundId: string,\n playerId: string,\n}\n\ninterface GameSubmitFormState {\n definition: string,\n}\n\nexport class GameSubmitForm extends Component {\n\n constructor(props: GameSubmitFormProps) {\n super(props)\n\n this.state = {\n definition: \"\",\n }\n\n this.onSubmit = this.onSubmit.bind(this)\n this.onDefChange = this.onDefChange.bind(this)\n }\n\n onSubmit(evt: any) {\n playClick()\n Axios.post(\"/api/game/\" + this.props.gameId + \"/submit\", {\n playerId: this.props.playerId,\n roundId: this.props.roundId,\n definition: this.state.definition,\n }).then(() => {\n })\n evt.preventDefault()\n }\n\n onDefChange(evt: any) {\n this.setState({\n definition: evt.target.value\n })\n }\n\n render() {\n\n return (\n
\n
\n \n Definition:\n \n \n \n
\n\n
\n );\n }\n}","import React, { Component } from 'react';\nimport Axios from 'axios';\nimport { definition } from '../models/definition';\nimport { ListGroup } from 'react-bootstrap';\nimport { playClick } from '../Sounds';\n\ninterface GameVotingFormProps {\n gameId: string,\n roundId: string,\n playerId: string,\n definitions: definition[],\n}\n\nexport class GameVotingForm extends Component {\n\n constructor(props: GameVotingFormProps) {\n super(props)\n\n this.vote = this.vote.bind(this)\n }\n\n vote(definitionId: string) {\n playClick()\n Axios.post(\"/api/game/\" + this.props.gameId + \"/vote\", {\n playerId: this.props.playerId,\n roundId: this.props.roundId,\n definitionId: definitionId,\n }).then(() => {\n })\n }\n\n\n render() {\n\n return (\n
\n\n
\n \n {this.props.definitions.map((def: any) => {\n return (\n { this.vote(def.id); }}>\n {def.definition}\n \n );\n })}\n \n
\n\n
\n );\n }\n}","import React, { Component } from 'react';\nimport { game } from '../models/game';\n\ninterface GameRoundSummaryProps {\n playerId: string,\n gameState: game,\n}\n\nexport class GameRoundSummary extends Component {\n render() {\n\n let players: { [id: string]: string } = {}\n this.props.gameState.players.forEach((p) => { players[p.id] = p.name })\n\n return (\n
\n
\n
\n Round {this.props.gameState.currentRound.num} Summary - {this.props.gameState.currentRound.word}\n
\n
\n
    \n {this.props.gameState.currentRound.definitions.map((d) => (\n
  • \n {d.definition} {!d.player && (the correct answer)}\n {d.player &&  (by {players[d.player]})}\n
      \n {(d.votes || []).map((v) => (\n
    • Voted for by {players[v]}
    • \n ))}\n
    \n
    \n
  • \n ))}\n
\n
\n
\n\n
\n );\n }\n}","import React, { Component } from 'react';\nimport Table from 'react-bootstrap/Table'\nimport { game } from '../models/game';\nimport { FaTrophy } from 'react-icons/fa';\nimport { playWin, playLose } from '../Sounds';\n\ninterface GameScoreBoardProps {\n playerId: string,\n gameState: game,\n}\n\nexport class GameScoreBoard extends Component {\n\n componentDidMount() {\n if (!this.props.gameState.players || this.props.gameState.players.length === 0) return;\n let firstPlaceScore = this.props.gameState.players[0].score;\n this.props.gameState.players.forEach((p) => {\n if (p.id === this.props.playerId) {\n if (p.score === firstPlaceScore) {\n playWin()\n } else {\n playLose()\n }\n }\n })\n }\n\n render() {\n\n let players: { [id: string]: string } = {}\n this.props.gameState.players.forEach((p) => { players[p.id] = p.name })\n\n let place = 0\n let placeScore = 9999999999\n\n\n return (\n
\n

Score Board

\n \n \n \n \n \n {this.props.gameState.players.map((p: any) => {\n return (\n \n \n \n );\n })}\n \n
PlayerScore
\n {\n (() => {\n if (p.score < placeScore) {\n placeScore = p.score\n place++\n }\n })()\n }\n {place === 1 &&   1st}\n {place === 2 &&   2nd}\n {place === 3 &&   3rd}\n {p.name}{p.score}
\n\n

Rounds

\n\n {this.props.gameState.rounds.map((r) => {\n\n return (\n
\n
\n
\n Round {r.num} - {r.word}\n
\n
\n
    \n {r.definitions.map((d) => (\n
  • \n {d.definition} {!d.player && (the correct answer)}\n {d.player &&  (by {players[d.player]})}\n
      \n {(d.votes || []).map((v) => (\n
    • Voted for by {players[v]}
    • \n ))}\n
    \n
    \n
  • \n ))}\n
\n
\n
\n
\n
\n );\n\n })}\n\n
\n );\n }\n}","import React, { Component } from 'react';\n\ninterface GameRulesProps {\n mode: number,\n rounds: number,\n}\n\nexport class GameRules extends Component {\n render() {\n return (\n
\n
\n
\n Rules for this game\n
\n
\n {this.props.mode === 0 &&
    \n
  • This game will consist of {this.props.rounds} rounds.
  • \n
  • In each round, you will be presented with an unusual but real word.
  • \n
  • You will have to make up a definition that you think your friends will believe is the correct definition (hint: the real definitions are usually fairly short such as 'room for conversation').
  • \n
  • Once everybody has submitted their best guess for what the word means, you'll be presented with a shuffled list of everybody's definitions and the correct definition.
  • \n
  • You get one point for each of your friends who mistakenly pick your definition as the correct definition.
  • \n
  • You get three points if you can correctly identify the real definition.
  • \n
  • At the end of {this.props.rounds} rounds, the player with the most points is the winner.
  • \n
  • That's it. Have fun.
  • \n
}\n {this.props.mode === 1 &&
    \n
  • This game will consist of {this.props.rounds} rounds.
  • \n
  • In each round, you will be presented with a crazy random word.
  • \n
  • You will have to make up an outlandish definition for the crazy random word. Something that's so hilarious and awesome that your friends have to vote for it!
  • \n
  • You get one point for each vote your crazy definition gets.
  • \n
  • At the end of {this.props.rounds} rounds, the player with the most points is the winner.
  • \n
  • That's it. Have fun.
  • \n
}\n
\n
\n\n
\n );\n }\n}","import React, { Component } from 'react';\nimport Websocket from 'react-websocket';\nimport Row from 'react-bootstrap/Row';\nimport Col from 'react-bootstrap/Col';\nimport { Roster } from './Roster';\nimport { GameStartButton } from './GameStartButton';\nimport { GameHeader } from './GameHeader';\nimport { GameSubmitForm } from './GameSubmitForm';\nimport { GameVotingForm } from './GameVotingForm';\nimport { GameRoundSummary } from './GameRoundSummary';\nimport { GameScoreBoard } from './GameScoreBoard';\nimport { game } from '../models/game';\nimport { Alert, Spinner } from 'react-bootstrap';\nimport Axios from 'axios';\nimport { GameRules } from './GameRules';\n\ninterface GameProps {\n gameId: string,\n playerId: string,\n playerName: string,\n}\n\ninterface GameState {\n gameState: game | null,\n error: boolean,\n}\n\nexport class Game extends Component {\n intervalId: NodeJS.Timeout | null = null;\n ws: JSX.Element | null = null;\n\n constructor(props: GameProps) {\n super(props)\n\n this.state = {\n gameState: null,\n error: false\n }\n\n this.timer = this.timer.bind(this)\n this.onMessage = this.onMessage.bind(this)\n this.onSocketError = this.onSocketError.bind(this)\n this.onSocketConnect = this.onSocketConnect.bind(this)\n }\n\n onSocketError() {\n this.setState({\n error: true\n })\n }\n\n onSocketConnect() {\n this.setState({\n error: false\n })\n }\n\n componentDidMount() {\n this.intervalId = setInterval(this.timer, 10000);\n }\n\n componentWillUnmount() {\n if (this.intervalId) {\n clearInterval(this.intervalId);\n }\n }\n\n timer() {\n Axios.post(\"/api/game/\" + this.props.gameId + \"/ping\", {\n playerId: this.props.playerId\n }).catch((e) => {} )\n\n }\n\n onMessage(msg: any) {\n let gameState: game | null\n gameState = JSON.parse(msg)\n this.setState({\n gameState: gameState\n })\n }\n\n render() {\n // URL for web socket\n var loc = window.location, ws_uri;\n if (loc.protocol === \"https:\") {\n ws_uri = \"wss:\";\n } else {\n ws_uri = \"ws:\";\n }\n ws_uri += \"//\" + loc.host;\n ws_uri += \"/api/game/\" + this.props.gameId + \"/ws?name=\" + encodeURIComponent(this.props.playerName) + \"&playerid=\" + encodeURIComponent(this.props.playerId);\n\n if (!this.props.playerId || !this.props.playerName) {\n return null\n }\n\n if (this.state.error) {\n return Error connecting to server. Try reloading the page.;\n }\n\n return (\n
\n
\n\n {!this.state.gameState && }\n\n \n\n {this.state.gameState && (this.state.gameState.state === 0 || this.state.gameState.state === 1) &&\n
\n \n \n \n {this.state.gameState.canSubmit && }\n {this.state.gameState.canVote && }\n {this.state.gameState.currentRound && this.state.gameState.currentRound.state === 2 && }\n {this.state.gameState.canStart &&
}\n {this.state.gameState.state === 0 && }\n \n \n \n \n
\n
\n }\n\n {this.state.gameState && this.state.gameState.state === 2 &&\n
\n \n \n \n \n \n \n
\n }\n\n
\n );\n }\n}","import React, { Component } from 'react';\nimport Button from 'react-bootstrap/Button';\nimport Form from 'react-bootstrap/Form';\nimport { Game } from './Game';\nimport Axios from 'axios';\nimport { playClick } from '../Sounds';\n\ninterface GameShellProps {\n gameId: string,\n playerId: string,\n playerName: string,\n onSetName: (name: string) => void,\n}\n\ninterface GameShellState {\n name: string,\n hasJoined: boolean,\n nameIsAvailable: boolean,\n nameIsAvailableRunning: boolean,\n loading: boolean,\n}\n\nexport class GameShell extends Component {\n constructor(props: GameShellProps) {\n super(props)\n\n this.state = {\n name: props.playerName,\n loading: true,\n hasJoined: false,\n nameIsAvailable: false,\n nameIsAvailableRunning: props.playerName !== \"\",\n }\n\n this.onNameUpdate = this.onNameUpdate.bind(this)\n this.onJoin = this.onJoin.bind(this)\n }\n\n componentDidMount() {\n Axios.post('/api/game/' + this.props.gameId + '/has_player', {\n playerId: this.props.playerId,\n }).then((r) => {\n this.setState({\n loading: false,\n hasJoined: r.data,\n })\n })\n\n if (this.props.playerName.length > 0) {\n Axios.post('/api/game/' + this.props.gameId + '/name_available', {\n name: this.props.playerName,\n }).then((r) => {\n this.setState({\n nameIsAvailable: r.data,\n nameIsAvailableRunning: false,\n })\n })\n }\n }\n\n onNameUpdate(evt: any) {\n var name = evt.target.value.substring(0,20);\n this.setState({\n name: name,\n nameIsAvailable: false,\n nameIsAvailableRunning: true,\n })\n if (name.length > 0) {\n Axios.post('/api/game/' + this.props.gameId + '/name_available', {\n name: name,\n }).then((r) => {\n this.setState({\n nameIsAvailable: r.data,\n nameIsAvailableRunning: false,\n })\n })\n }\n }\n\n onJoin(evt: any) {\n if (this.state.name && this.state.name.length > 0) {\n playClick()\n this.props.onSetName(this.state.name)\n this.setState({\n hasJoined: true\n })\n }\n evt.preventDefault()\n }\n\n render() {\n\n if (this.state.loading) return null;\n\n if (!this.state.hasJoined) {\n return (\n
\n

Joining game {this.props.gameId}

\n
\n \n Name\n \n {!this.state.name && A name is required to join a game}\n {this.state.name && !this.state.nameIsAvailable && !this.state.nameIsAvailableRunning && This name is already in use in this game}\n \n \n
\n
\n );\n } else {\n return (
);\n }\n }\n}","import React, { Component } from 'react';\n\nexport class Rules extends Component {\n render() {\n return (\n
\n

Rulez for Werdz

\n\n

It is recommended that you play this while video chatting with the other 3-10 other players.

\n

What works well for us is sitting in front of a laptop for the video chat, and using phones for the game.

\n\n
    \n
  • Connect with your friends on video (I suggest meet.jit.si)
  • \n
  • One player starts a new game and shares the code with everybody via. the video chat. That player chooses the number of rounds, and the game mode.\n
  • \n
  • Everybody joins the game
  • \n
  • Some player chooses the game type, number of rounds, and presses the start button
  • \n
\n\n\n
\n
\n Rules for Real Word (Normal) Mode\n
\n
\n
    \n
  • This game will consist of a number rounds.
  • \n
  • In each round, you will be presented with an unusual but real word.
  • \n
  • You will have to make up a definition that you think your friends will believe is the correct definition (hint: the real definitions are usually fairly short such as 'room for conversation').
  • \n
  • Once everybody has submitted their best guess for what the word means, you'll be presented with a shuffled list of everybody's definitions and the correct definition.
  • \n
  • You get one point for each of your friends who mistakenly pick your definition as the correct definition.
  • \n
  • You get three points if you can correctly identify the real definition.
  • \n
  • At the end of the game, the player with the most points is the winner.
  • \n
  • That's it. Have fun.
  • \n
\n
\n
\n
\n\n
\n
\n Rules for Fake Word Mode \n
\n
\n
    \n
  • This game will consist of a number rounds.
  • \n
  • In each round, you will be presented with a crazy random word.
  • \n
  • You will have to make up an outlandish definition for the crazy random word. Something that's so hilarious and awesome that your friends have to vote for it!
  • \n
  • You get one point for each vote your crazy definition gets.
  • \n
  • At the end of the game, the player with the most points is the winner.
  • \n
  • That's it. Have fun.
  • \n
\n
\n
\n\n\n
\n );\n }\n}","import React from 'react';\nimport './App.css';\nimport { Route } from 'react-router';\nimport { Layout } from './components/Layout';\nimport { Home } from './components/Home';\nimport { About } from './components/About';\nimport { GameShell } from './components/GameShell';\nimport { BrowserRouter as Router } from 'react-router-dom'\nimport Axios from 'axios'\nimport { Rules } from './components/Rules';\n\nexport class App extends React.Component<{}, any> {\n constructor(props: any) {\n super(props)\n this.state = {\n playerId: localStorage.getItem(\"playerid\"),\n playerName: localStorage.getItem(\"playername\"),\n }\n\n this.setName = this.setName.bind(this);\n }\n\n componentDidMount() {\n if (!this.state.playerId) {\n Axios.get('/api/player/generate', {})\n .then((resp: any) => {\n this.setState({\n playerId: resp.data.id,\n })\n localStorage.setItem('playerid', resp.data.id)\n })\n }\n }\n\n setName(name: string) {\n this.setState({\n playerName: name,\n });\n localStorage.setItem('playername', name);\n }\n\n render() {\n if (!this.state.playerId) return null;\n\n return (\n \n \n (\n \n )} />\n \n \n (\n \n\n )} />\n \n \n );\n }\n}\n\nexport default App;\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.0/8 are considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\ntype Config = {\n onSuccess?: (registration: ServiceWorkerRegistration) => void;\n onUpdate?: (registration: ServiceWorkerRegistration) => void;\n};\n\nexport function register(config?: Config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(\n process.env.PUBLIC_URL,\n window.location.href\n );\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl: string, config?: Config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl: string, config?: Config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl, {\n headers: { 'Service-Worker': 'script' }\n })\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready\n .then(registration => {\n registration.unregister();\n })\n .catch(error => {\n console.error(error.message);\n });\n }\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport 'bootstrap/dist/css/bootstrap.css';\nimport './index.css';\nimport App from './App';\nimport * as serviceWorker from './serviceWorker';\n\nReactDOM.render(\n \n \n ,\n document.getElementById('root')\n);\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n"],"sourceRoot":""}