From: Sam Rose Date: 2011-11-04T09:43:14+09:00 Subject: Re: Recursion WTF! Ah, right! Sorry, I misunderstood. Yeah, you're absolutely right. Counting connected land tiles would be really hard to do just using loops. I remember using a similar recursive algorithm to this one when writing a Minesweeper game :) Sorry, I thought it was just counting all land tiles. On 3 November 2011 21:59, Gunther Diemant wrote: > 2011/11/2 Sam Rose : >> Recursion is a really great tool for problems like this :) I think the >> example is a little bit contrived, though. Counting the land tiles is >> nothing that a simple loop or two couldn't solve. However, I suppose >> he is trying to illustrate a point. > > I think its not about counting all land tiles, instead it counts > connected land tiles (containing the start point). > This problem isn't so easy to solve with a simple loop. > >