import {newGame, dropPiece} from './connect4.js' // FIXME: support multiple games in the future! let the_game = newGame() app.get('/:gameid/game', (req, res) => { // FIXME: find the game for the given gameid. res.json(the_game) }) app.get('/:gameid/set/:column', (req, res) => { let column = parseInt(req.params['cell']) dropPiece(the_game, column) res.json(the_game) })