Closed Chadtech closed 4 years ago
So Far, The web-server can serve static files from the server/static
directory, I plan to make it a lot more cleaner by refactoring routes to another file.
With regards to [x] Give it an end point for starting a new game
The POST
request endpoint /game/create
was created which takes a post request with the paramters GameName
and NumberPlayers
. So far the endpoint prints to the public but we could use it to mutate the model
We should look towards changing the names of our parameters, terms like
model
are not very good at conceptualizing things moving forward
Awesome! @VictorXLR I am checking off that second todo item then.
Do you have any ideas for alternatives to Model
?
The name "Model" comes from frontend development like in Elm, where its a good technique to have one block of state for the entire application. The Elm community usually calls it "Model" but I have also seen "State".
I think Model is ok if it serves its purpose with regards to variable naming, with regards to alternatives i was thinking more in term of Global
& Local
since the game has a seed which mutates other games from it, I was thinking more of that sense, but i dont really care
I think 4d2c3354df38e995e741e355f55aa3497af2d76c is a good starting point with regards to Mutating the server endpoint as we can create a new game and add it to the shared state
Great! This is all done. Closing it.
Right now there is a super simple web server. But I am realizing:
The objectives here then, are..