Samantha Rupasingha wrote:An object can only move horizontally or vertically.
OK, then I'm confused, because in the example you gave, even if '*' can move any distance (and assuming a '1' means a wall), the number of places it can move to is 4 unless you ALSO include any
combination of valid vertical and horizontal moves from each endpoint.
Either way, I'd say that Carey's solution is a darn good place to start.
Winston