moving empty cell logic to board