refactored "piece.onBoard" flag checking