Looking for a basic game lobby for a card game. The game itself will not be played on the web site, so it will be a web service that handles JSON requests (and gives JSON responses). There will, however, need to be a login page that is mobile friendly and returns the user's session id. Logout should also be supported.
A single game will consist of either 4 or 6 players, so the server should be able to return a list of both, just 4-player games or just 6-player games. Only games that are not full should be returned, and should be returned in order from oldest (first created) to newest (most recently created). The number returned should be configurable by a parameter, but should default to a number if that parameter is not passed in.
As some users may resign in games or lose connectivity, there should also be an option to mark games as open once this happens. That way, a table can get a replacement player.
Users should be able to create a tableor join a table. A table can be public or private (private tables are only shown to friended users). A user can send an invite to other players when creating a table (can be selected from a friended users list).
Users will be able to chat with one another while in a game and in the game lobby.
Stats will be tracked for each user (games played, won games, lost games, games resigned, date account created).
Initial use of the site will be considered beta and invitation only. As mentioned before, users should be able to invite other users, but will have a limited number of invites from the start (an admin should be able to reset these).
## Deliverables
Ruby is preffered.
A leaderboard type system would be nice, with daily, weekly, monthly and all-time leaders. See <[login to view URL]> for more information.
The framework for the service should understand the basic concept of a deck of cards. As a table is filled, users will be notified that another user has joined. Once the table is full, a random dealer will be chosen by the service, and cards will be dealt to each player. Users will bid in turn, which the service will validate before notifying other users. There will be a discard round. When a user plays a card, the server will also need to validate the play (that the user still had the card to be played), remove it from their hand before notifying other players.