i think we are looking at the board differently here is how i am looking at it
Code:
//b= black square w = white square
//row 7 w b w b w b w b <---blacks end
//row 6 b w b w b w b w
//row 5 w b w b w b w b
//row 4 b w b w b w b w
//row 3 w b w b w b w b
//row 2 b w b w b w b w
//row 1 w b w b w b w b
//row 0 b w b w b w b w <----whites end
here is the truth table generated
Code:
//column | row | good square
// odd | odd | place piece
// odd | even | invalid square
// even | odd | invalid square
// even | even | place piece
i guess having written that out i can use:
Code:
if (((i % 2 == 0) && (j % 2 == 0)) || ((i % 2 != 0) && (j % 2 != 0)))
{
board[i][j] = valid_square;
)
else
{
board[i][j] = invalid_square;
}
the code in the above post is just setting up the board and array for the beginning of the game so i have a physical reresentation of the board on the screen and an array to set and check pieces against
hope this clears it up
coop