[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[pbmserv-dev] my moultezim program is buggy. help!



Can someone help me with the moultezim program.  I cannot figure
out how to make copies of an integer array for a recursive routine.
In the header file there is a class called BB and one of its
variables is an array of integers board[25]
now what I want is to call a recursive routine with copies of
the board[] but I do not want to upset the original board[] array.
If you happen to have moultezim.h and moultezim.cpp look closely
at Moultezim::CanMove(...)  and Moultezim::canmove2(...)  and
Moultezim::canmove3(...)  
CanMove calls the other two and the other two are recursive routines.
The problem I believe is that I am not using carbon copies of board[]
but rather I am upsetting the original board[] array that is in the
main class structure.  Am I correct?  Am I upsetting the main class
board[] array when I change board[] values?  How do I correct this?
I want a new copy with each level of recursion (maximum 4) of the board[]
array.  Any help would be appreciated.

--
 Douglas Zander                |  
 dzander@solaria.sol.net       | 
 Shorewood, Wisconsin, USA     |