refactored wasClicked function in boardcell