Hacker News new | ask | show | jobs
by vijayr02 2077 days ago
How long does it take to generate boards?

An alternate approach would be to repeatedly generate the board after the first click, till the board has a hole under the click.

1 comments

Yeah, totally get your point. Generating one is inexpensive, maybe 1 ms to get it cranking. It's entirely possible that looping through untampered RNG combinations until a hole opens is more efficient than scrolling the field around.

The algorithm to locate the biggest hole on a 1,200 tile board takes around 45ms and I'm stubbornly itching to use it one way or another. But I'll see what's a more sane solution over shifting fields.