public MultiplayerGameMoveHandler(Connection connection, User user, IGameHubContext gameHubContext, IGameData gameData)
 {
     _connection     = connection;
     _user           = user;
     _gameHubContext = gameHubContext;
     _gameData       = gameData;
 }
        public IMoveHandler CreateMoveHandler(Connection connection, User user, IGameHubContext gameHubContext, IGameData gameData)
        {
            IMoveHandler moveHandler;

            if (connection.Multiplayer)
            {
                moveHandler = new MultiplayerGameMoveHandler(connection, user, gameHubContext, gameData);
            }
            else
            {
                moveHandler = new SingleGameMoveHandler(connection, user, gameHubContext);
            }

            return(moveHandler);
        }
 public GameManager(IGameData gameData, IGameHubContext gameHubContext, IMoveHandlerFactory moveHandlerFactory)
 {
     _gameData           = gameData;
     _gameHubContext     = gameHubContext;
     _moveHandlerFactory = moveHandlerFactory;
 }
Example #4
0
 public SingleGameMoveHandler(Connection connection, User user, IGameHubContext gameHubContext)
 {
     _connection     = connection;
     _user           = user;
     _gameHubContext = gameHubContext;
 }