DoSomething/ds-mdata-responder — pull request #138 by jonuy (2014-09-02 23:28:22+00:00)
Title: SMS-63: Actively end game when a user gets invited out of it

#### What's this PR do?
This PR handles the case where a user, who is already in a game in progress, gets invited to another game. Previously, they would just be pulled out of the first game, leaving everyone in that one out to dry. With this PR, we actively end that game and message the other players about what's happened.

#### Where should the reviewer start?
The `.createGame` logic has been modified a bit. After creating the game document, there's an added step where it searches for the user documents of the invited players. For any user documents that are found, it will attempt to end the games they are in: `self._endGameFromPlayerExit(playerDocs);`

In `_endGameFromPlayerExit`, it will search for all the game documents these players are in. Then, it'll find all the other players who were in those games as long as the game hasn't yet ended. This list of players gets notified about the game being ended, and the game gets marked as having ended (`game_ended: true`).

#### What are the relevant tickets?
SMS-63