Ejemplo n.º 1
0
        public async Task Start(string name, Tuple <string, bool>[] phases, string[] playerOrder)
        {
            var game = await _gameRepository.GetByNameAsync(name);

            var players   = playerOrder.Select(u => game.Players.First(p => p.UserName == u));
            var turnOrder = TurnOrder.Create(players.Select(PlayerTurnOrder.Create));
            var phase     = Phase.Create(phases.Select(p => p.Item1));

            game.Start(turnOrder, phase);
        }