The theory of two-person impartial games along with its implementation in
Mathematica is covered in the book by Robert Cowen and John Kennedy,
Discovering Mathematics with Mathematica, which is currently being revised to be compatible with
Mathematica 6. For more on programming two-person impartial games in
Mathematica see
http://qcpages.qc.edu/~cowen/