I have two arrays, `points` and `normalized`, and I'm copying points from `points` to `normalized` and replacing with a default value when one doesn't exist. Is there a better way to do this instead of iterating? https://gist.githubusercontent.com/fj/126f6e432509e5dc34aa/raw/1bf5d7d8cf7b152adc7143003553ea4be96337fe/gistfile1.txt
For example, is there a way I can just fill up the values instead of needing to use a while loop?
I looked at Array#fill but it's not quite what I want, I don't think.
jhass: Yes, that's right (the "dates" are really numerical indices.)
Ah, you're right, of course. Thanks for helping me see that.
jhack: There's a lot to talk about there, but generally I would have expected something like a Card object, a Deck object that holds all the possible cards, a Deck#shuffle that shuffles the cards, a Deck#take that takes the top card, and so on. Then your "Game" is a one or more Players and a Deck.
jhack: There isn't any "one right way" to do it. Generally speaking, though, developers tend to favor solutions where the cost of making a change is small.