Example #1
0
        var mapCallback = function(player){

            var newPlayer = _.extend({}, player);
            newPlayer.ownCards.push(deck.takeCard(), deck.takeCard());

            return newPlayer;
        };
Example #2
0
        var mapCallback = function(player, index){

            var newPlayer = _.extend({}, player);

            if(index === 0){
                newPlayer.dealer = true;
            }else if(index === 1){
                newPlayer.blind = smallBlind;
            }else if(index === 2){
                newPlayer.blind = bigBlind;
            }

            return newPlayer;
        };