Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Very similar to other katas about "implementing a bot who forces the opponent to pick last something". Also, input validation is more annoying than anything.
This test case makes zero sense.
True
is not a integer,bool
is subclass ofint
:https://stackoverflow.com/a/2764099
-1
as input surprised me, as in the description, negative integers are not mentioned as 'Invalid'.5, 10, 15, 20
are invalid? For 20, of course, computer lost, but for the others, a one-number or a random move could be done, just as in the real game.