ahchoo / realtime

0 stars 0 forks source link

Hide admin in game room #122

Open BohanHsu opened 9 years ago

BohanHsu commented 9 years ago

After establish the game manage page. We currently simply treat the admin as a player who cannot play. Admin will be shown in player list same as player. This could possibly misleading the people who play the game. We should hide admin in the game room. Currently my thinking is in the lib/socket/game.js we keep track a list of admin instead registered the admin in the player list. Player only get noticed when other player joined. Admin will get noticed when other player and admin joined.

BohanHsu commented 9 years ago

I'm thinking of emit player(admin) joined event after game model finished the join process. This could allow the game model to process the 'join' logic. Not sure is there any specific reason you do the emit in index.js on socket connection event. @fuqcool