State: which numbers have been used. With , a bitmask works perfectly. Bit set means number is used.
Winning condition: current player can pick a number that either wins immediately (total target) or leaves opponent in a losing state. We don't need to track whose turn it is. The current player is always "me" in the recursion. If I can win from this state, the state is winning.