One does not need both min and max vars, when the arrays are sorted you just need to store the ceiling of the previously calculated interval
looks like it's not happening anymore. Poke at me on discord if you still see the problem
no actionnable information, closing.
no actionnable feedback, closing
Ruby 3.0 should be enabled, see this to learn how to do it
nope, it's not a wrong case.. u didn't floored the population increase
-so this year 200 children and... ONE LEG!!! were born in our city xDDDD
Ruby error on submit:
main.rb:264: dynamic constant assignment
FULL_DECK = "A 2 3 4 5 6 7 8 9 10 J Q K"...
main.rb:283: syntax error, unexpected end-of-input, expecting keyword_end
Regarding the one solution where all 4 hands end up with Blackjack... Why does the solution require that nobody wins? Does the game require that all 4 draw one card which puts them over 21? Otherwise the croupier would get the blackjack first and the other 3 lose theirs, right? I never play cards so I don't know all the rules.
you don't understand the current problem: as long as what you show as expected result doesn't match what I find when I use the inputs you provide, you cannot debug your code because you're obsiously not using the correct data somehow. So there is no point discussing the rules as long as this isn't sorted out first. ;)
Check that you didn't invert some inputs in the signature of the function: (p1,p2,p3,dealer,deck). If ok, post a screenshot of the output panel with the failed assertion and your logs (not your solution)
Ok may be i missread, could you tell how we supposed to handle winners when dealer has more than 21 ?
I don't know what you're doing, but again, that test is not expecting this. Answer for the described situation with the ref solution is Player 1. Again, I think you're not reading the logs of the correct test. You should read this.
Thanks for the reply,
Sorry should have precise deck as well ^^ Can't find the test anymore, here is another one in same type:
p1: [ '5', '10' ]
p2: [ '10' ]
p3: [ '9', 'A', '2' ]
dealer: [ '10', '6' ]
deck: [ '6','7','9','9','2','2','8','4','Q','J','4','J','3','7','6','2','10','K','5','10','10' ]
expected 'Player 1, Player 2' to equal 'Player 1, Player 2, Player 3'
May be there is one condtion i didn't understand like when dealer has more than 21, what determines who wins (those who have less than 21 ?)
Thanks for your time !
What are the exact inputs? you don't give the deck.
And are you sure you're not looking at the logs below the failed assertion instead of above? Because the ref solution is mine, and I can tell you it won't return Player 2 with that starting hand, so...
Are you sure about the tests in JS, come cases are really weird.. Can't understand the reason :
p2: [ '4', 'A', '7', '5' ]
p3: [ '9' ]
=> expected 'Player 1, Player 3' to equal 'Player 1, Player 2, Player 3'
I assumed that if dealer has more than 21, all players below or equal 21 win, but doesn't work in this case..