I do not understand the conditions of this task. Let's take the simplest example:
assert.equal(stones(99, [1]), 2)
Obviously, the first one will take the last stone, and the condition
If the current amount of the stones in the pile is lower than lowest number
in the "moves" list - current player takes them all and lose.
will not be fulfilled (1 less than 1? no). The second player has problem... But somehow he wins.
Created at: 2018/09/19 16:22; Updated at: 2019/09/21 04:09
The question is resolved.