Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
void Board::set(int coordinate, int c){
for (int i = 0; i < 16; ++i){
cells[i][coordinate] = false;
}
base mask = 0;
int x = coordinate /16, y = coordinate %16, block;
mask |= (xMask << (x*16));
mask |= (yMask << y);
block = (x/4)*4 + y/4;
mask |= (blockMask[block]);
cells[c] &= ~mask;
cells[c][coordinate] = true;
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment