optimized playerIsInChess function