test.each([
{ input: { stones: [20, 3, 20, 17, 2, 12, 15, 17, 4] }, output: true },
{
input: {
stones: [
2, 33, 90, 62, 43, 21, 96, 20, 18, 84, 74, 61, 100, 5, 11, 4, 67, 96, 18, 6, 68, 82, 32, 76, 33, 93, 33, 71, 32,
30, 63, 37, 46, 95, 51, 63, 77, 63, 84, 52, 78, 66, 76, 66, 9, 73, 92, 79, 65, 29, 42, 64, 46, 84, 95, 71, 15,
68, 55, 9, 22, 64, 56, 83, 52, 47, 38, 19, 59, 32, 89, 29, 56, 84, 57, 90, 96, 19, 38, 13, 49, 65, 93, 8, 30,
15, 12, 40, 84, 7, 6, 75, 36, 31, 6, 78, 64, 33, 49,
],
},
output: false,
},
{ input: { stones: [2, 1] }, output: true },
{ input: { stones: [2] }, output: false },
{ input: { stones: [5, 1, 2, 4, 3] }, output: false },
])('input: stones = $input.stones', ({ input: { stones }, output }) => {
expect(stoneGameIX(stones)).toEqual(output)
})