Extract the code that filters board location to a separate function.
Clear the entire bit range before setting up the new value.
Handle the cases when the player closes a mill by placing a piece on the board.