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.
beats[p2] == p[1] means vise-versa. If player2, nor player1 cant win, then its draw lol
But the second one also which says beats[p2] == [p1] gives the same value, where key beats value always, the how will player 2 win?
I had a hard time to understand this so i will try to explain for the poeple, who had a question like me.
results = ['Draw!', 'Player 1 won!', 'Player 2 won!']
the first item in the arrays has index [0], the second has index[0] etc but when its negative its go backwards like
'Player 2 won!' is [-1], 'Player 1 won!' is [-2] and finally 'Draw!' is [-3].
[-0] is same as [0]
This comment is hidden because it contains spoiler information about the solution