diff --git a/src/InterfaceAdapter/Gaas.GobbletGobblers.Core.WebApi/Controllers/GameController.cs b/src/InterfaceAdapter/Gaas.GobbletGobblers.Core.WebApi/Controllers/GameController.cs index 1bf91a7..c710767 100644 --- a/src/InterfaceAdapter/Gaas.GobbletGobblers.Core.WebApi/Controllers/GameController.cs +++ b/src/InterfaceAdapter/Gaas.GobbletGobblers.Core.WebApi/Controllers/GameController.cs @@ -25,6 +25,11 @@ public GameController(ILogger logger, IRepository repository) [Route("~/games")] public async Task GamesAsync(GameRequest request) { + if (request.Players.Count != 2) + { + throw new Exception("Requires at least two players to play"); + } + var createGameRequest = new CreateGameRequest { PlayerId = new Guid(Convert.FromBase64String(request.Players[0].Id).Take(16).ToArray()),