Sanguosha.Core.Games.RoleGame.StartGameDeal C# (CSharp) Méthode

StartGameDeal() private static méthode

private static StartGameDeal ( Game game ) : void
game Game
Résultat void
        private static void StartGameDeal(Game game)
        {
            List<CardsMovement> moves = new List<CardsMovement>();
            // Deal everyone 4 cards
            foreach (Player player in game.AlivePlayers)
            {
                CardsMovement move = new CardsMovement();
                move.Cards = new List<Card>();
                move.To = new DeckPlace(player, DeckType.Hand);
                game.Emit(GameEvent.StartGameDeal, new GameEventArgs() { Source = player });
                int dealCount = 4 + player[Player.DealAdjustment];
                for (int i = 0; i < dealCount; i++)
                {
                    game.SyncImmutableCard(player, game.PeekCard(0));
                    Card c = game.DrawCard();
                    move.Cards.Add(c);
                }
                moves.Add(move);
            }
            game.MoveCards(moves, null, GameDelays.GameBeforeStart);
        }