teamnzs / ios-trivia-game

iOS Trivia Game
0 stars 0 forks source link

Issue/api for creating game #44

Closed wassupnari closed 7 years ago

wassupnari commented 7 years ago

This PR enables the API call to Firebase to create a game in game_room table like below:

screen shot 2016-11-26 at 9 28 12 pm

As you can see, the key value of game_room hash is auto generated, and I didn't set id in the object, because I think we should generate it automatically from the Firebase instance, not by hard-coding it. If you guys agree with that, I'll put the auto-generated id in a separate PR.

Newly created game room looks like this:

screen shot 2016-11-26 at 9 33 14 pm

Let me know if you guys notice anything!

wassupnari commented 7 years ago

One more thing! I also added logic that prevents selecting more people than max number of players. max-players