eladb/frienderers-ios — pull request #1 by eladb (2014-02-12 09:17:31+00:00)
Title: Refactor states

The idea is to keep state management in a single place: the backend.

1. Server returns [state](https://github.com/eladb/frienderers-backend/blob/278f120bb6c7cc6c5e0715a68d9a2bcc5b4b931d/game.rb#L78) field in every response.
2. `TKServer` updates their `state` property whenever we send any request to the server.
3. `TKAppViewController` observes `[TKServer sharedInstance].state`
4. Whenever the state _changes_, `TKAppViewController` folds back the navigation
stack and pushes on the view controller scene based on the new state.