The description says Only worry about whole numbers, round down for fractions, but for clarity, it should be said what should be rounded down. When taking half of an odd-sized pot, does the amount you take get rounded down, does the amount left in the pot get rounded down, do both of these things happen (effectively removing a coin from the game), or do neither of these happen and does the rounding down only happen when reporting the final amount?
Only worry about whole numbers, round down for fractions
This is still an issue today. I guess this issue will not be fixed. :/
like a lot of other people have said, definitely seems like a harder than 5 kyu exercise. Feels like at least a 4.
This is a nice kata, I liked it, and I had no idea what a dreidel is or even that it exists. Thanks!
My solution had a bug which wasn't caught - For Gimel I was adding the pot to my coins without emptying the pot (bad!). I suggest adding the following test case:
Test.assertEquals(gamble(['Gimel', 'Shin', 'Gimel'], 10, 20), 30);
just print arguments with console.log()
hi, one of the tests are failing for me (nottest != notatest), the one thing I don't love about this Kata is that I don't even really know where to start when trying to debug that problem as many different combinations can yield the result nottest :\
yup absolutely right, updated
okay, issue with assertEquals fixed, thanks again @OverZealous :)
thanks! Edited :)
Noted and edited, thanks :)
oops, yeah Ill go back and correct that assertEquals, however the runs out of money is by design and I've updated the description to note that.