To define Grundy number, we let the Grundy number of the chocolate whose coordinates are｛0,0,0｝equal to 0. Then we define Grundy number recursively. Nim-sum (Nim-sum
) can be applied only for rectangular chocolates, but Grundy numbers can be calculated for any chocolate games. Grundy number is 0 if and only if the chocolate is previous player's position.