Function rookAttacks

Gets squares attacked or defended by a rook on square, given occupied squares.