Ask your own question, for FREE!
Computer Science 24 Online
OpenStudy (anonymous):

I just wrote a program for the game of checkers however I need to keep the moves made in the bounds of the board which is in the array the_board[][]. Any way of making sure the move entered is in the bounds? its an 8x8 board, and coding in c

OpenStudy (anonymous):

before allowing any move to take place you need to check it against the_board[][]

OpenStudy (anonymous):

if the move is about to put the position of a piece at x>9 || x<1 then don't allow that move

OpenStudy (anonymous):

well probably it's counted from 0 to 7 so if x > 7 || x < 0 don't allow to move

OpenStudy (jagatuba):

Good point Tomas.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!