"14 blocks of 9 hairs saved"
Last week's "wolf night" was full, and it took one and a half hours for a round of playing. As there was only one wolf card, it was not possible to group it. I thought I could buy a few more cards and then I could come back to the team, as a result, Zhu Yu said, "It's easy to do a pair directly." I think it's better to write a set of code instead of a pair, and many people will be able to use it in the future, in addition, the current Android and iOS teams need to exchange hands and practice with each other. Considering the continuity of the business, it is not convenient to exchange people easily. Such gadgets can be played together, sat on the floor in the afternoon of the sunny "LABA Festival", basking in the sun and designing the preliminary version of the "werewolf" game, saving 14 RMB 9 gross (cost of 9.9 RMB werewolf card + 5 RMB freight ). What is a werewolf game? See http://www.niwota.com/submsg/6808720)
I think everything is clear after reading these images:
Object:
Mission can be understood as a round of games. (Reusable, different from table and room of desktop games, can be understood as round of game)
Policy.
A combination of actor roles and players. (Mission stateful component)
Role of role.
Player players.
The game is actually very simple, it is a state machine, so the above lists the status migration, the following flowchart will detail the migration interaction process.
I. init & start
Ii. Night
3. Day
Finally, we can start coding. The server needs to solve two problems: how to efficiently listen to timeout events in event-driven systems, and how to support HTTP push? May look at this old post part of the technical introduction: http://blog.csdn.net/cenwenchu79/article/details/6450427
Client: browser, apple native, and Android native. For push, browser and android can directly use the comet push method. For apple native, only apns is available. The two native gesture operations and push prompts provide a good experience, and the browser can only work together.
The programmer's life requires more fun. It's not an interesting thing to do by yourself ~~~