Refactored the indexesForTouchedPiece: method.