public GamesController( IGetGameStateRequestHandler getGameStateRequestHandler, IGetVisibleGameTableRequestHandler getVisibleGameTableRequestHandler, IGetPlayerMarksRequestHandler getPlayerMarksRequestHandler, IMakeMoveCommandHandler makeMoveCommandHandler, IJoinGameCommandHandler joinGameCommandHandler, IMarkFieldCommandHandler markFieldCommandHandler, INewGameCommandHandler newGameCommandHandler) { _getGameStateRequestHandler = getGameStateRequestHandler ?? throw new ArgumentNullException(nameof(getGameStateRequestHandler)); _getVisibleGameTableRequestHandler = getVisibleGameTableRequestHandler ?? throw new ArgumentNullException(nameof(getVisibleGameTableRequestHandler)); _getPlayerMarksRequestHandler = getPlayerMarksRequestHandler ?? throw new ArgumentNullException(nameof(getPlayerMarksRequestHandler)); _makeMoveCommandHandler = makeMoveCommandHandler ?? throw new ArgumentNullException(nameof(makeMoveCommandHandler)); _joinGameCommandHandler = joinGameCommandHandler ?? throw new ArgumentNullException(nameof(joinGameCommandHandler)); _markFieldCommandHandler = markFieldCommandHandler ?? throw new ArgumentNullException(nameof(markFieldCommandHandler)); _newGameCommandHandler = newGameCommandHandler ?? throw new ArgumentNullException(nameof(newGameCommandHandler)); }
public ChessController(IStartGameCommandHandler startGameCommandHandler, IMakeMoveCommandHandler makeMoveCommandHandler) { _startGameCommandHandler = startGameCommandHandler; _makeMoveCommandHandler = makeMoveCommandHandler; }