     toString.call(obj) == '[object Array]'
 
 
-toPos = (posOrID) ->
-    return if isArray(posOrID) then posOrID else @position[posOrID]
+toPos = (posid) ->
+    return if isArray(posid) then posid else @position[posid]
 
 
 class Sliding

            @swap([r, col], @emptyID) for r in [erow..row]
        return @

    slidable: (pos) ->
        [row, col] = toPos.call(@, pos)
        [erow, ecol] = @position[@emptyID]
        return (0 <= row < @rows and 0 <= col < @cols) and
            not (row == erow and col == ecol) and


        return @

    slide: (posid, handler) ->
        if not @slidable(posid)
            return @
        [row, col] = toPos.call(@, posid)
        [erow, ecol] = @position[@emptyID]
        if row == erow
            handler?.call(@, @grid[row][c], @emptyID)
