/** Make a play. Only allows the joined players to */ app.get('/:gameid/set/:column', (req, res) => { const userid = getUserId(req, res) const game = games[parseInt(req.params['gameid'])] if (game == undefined) { res.status(404).json("no such game") } else if (game.state != "playing") { res.status(403).json("game is not playing") } else if (getCurrentPlayer(game) != userid) { res.status(403) res.json("Not your turn, my friend") } else { let column = parseInt(req.params['column']) dropPiece(game, column) res.json(toJson(game, userid)) } })