Https://www.geeksforgeeks.org/variation-nim-game/

My doubt is that in the ques given in link for n=2, we have only taken grundy(0) for calculating mex and ignored grundy(1) saying that going to 1 from 2 is not a valid move,but in nim game we generally take account those states which are reachable from current state instead of taking winning state.
Why?

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.