A condition of chocolate games are determined by the following two conditions.
In the above calculation the symbol made by plus and a circle is nim-sum. Nim-sum is addition without carries for numbers expressed in base 2. Nim-sum is the same as the "exclusive or" in computer science. If you leave chocolate whose cooridinate is nim-sum 0 to your opponent 0 each time, you will win the game.
Nim-sum is the addition without carries for numbers expressed in base 2.
When we use binary number, we express a number with 0 and 1.0.
To convert a decimal number to a binary number is not difficult.
For example, the decinal number 22 is 24+22+21 so we put 1 in 24 place, 22place and 21 place. We put 0 in other places. Then we have the binary number 10110.
We caluculate nim-sum in two steps. First express numbers in base 2, then we add them without carries.
If you leave the condition that nim-sum = 0 to your opponent each time, you finally win the game.