Subject: Advice on Nim
Date: Wed, 26 Nov 1997 00:53:30 -0500
From: Tom Utley

I have been assigned a project in computer science class to develop a class in C++ which will play against another class in the game of NIM. I used your theory to do so. However, when I recieved the referee program to test the files, I noticed a small problem: the object of the NIM that the professor was talking about is to NOT take the last stick. Could you please take a look at my strategy and suggest a way to keep it similar, but change it so that it is the opposite? I have looked over it time and time again, but I just can't figure out the way to invert the strategy. The file is tutley.cpp, method implementation from tutley.h; the referee.cpp is the file that runs the game.

Thank you for your help.

|Reply| |Previous| |Next| |Down| |Exchange index| |Contents| |Store|

Copyright © 1996-2012 Alexander Bogomolny

 40615572

A math books store at a unique math study site. Shopping at the store helps maintain the site. Thank you.
Sites for teachers
Sites for parents
Terms of use
Awards
Interactive Activities

CTK Exchange
CTK Wiki Math
CTK Insights - a blog
Math Help
Games & Puzzles
What Is What
Arithmetic
Algebra
Geometry
Probability
Outline Mathematics
Make an Identity
Book Reviews
Stories for Young
Eye Opener
Analog Gadgets
Inventor's Paradox
Did you know?...
Proofs
Math as Language
Things Impossible
Visual Illusions
My Logo
Math Poll
Cut The Knot!
MSET99 Talk
Old and nice bookstore
Other Math sites
Front Page
Movie shortcuts
Personal info
Privacy Policy

Guest book
News sites

Recommend this site

Sites for parents

Education & Parenting

Search:
Keywords:

Google
Web CTK
Supported by
3wVentures