This one is more detailled , I want to gradually fill the holes that are inclused by 3 or more blocks ... Screenie !

Capxie ! ( Okay ... Doesn't work :( ) !

Thanks for all !

16 posts
• Page **1** of **2** • **1**, 2

Hey Guys ! Guess What ... Another Array Issue ! Yay ... I'm so happy , I'm going to launch myself from the windows !

This one is more detailled , I want to gradually fill the holes that are inclused by 3 or more blocks ... Screenie !

Capxie ! ( Okay ... Doesn't work :( ) !

Thanks for all !

Whiteclaws 2012-12-31 16:37:02

This one is more detailled , I want to gradually fill the holes that are inclused by 3 or more blocks ... Screenie !

Capxie ! ( Okay ... Doesn't work :( ) !

Thanks for all !

**Posts:**2,247**Reputation:**17,471

B

42
S

17
G

17
Alright, say you go over all the xy elements (for each xy element), and check what the value was (current value), and suppose we say if that value was one then there should be a wall there.... easy right?

Now what if you do compare at xy, and compare what the value was for the next xy, or cell? Say for example current x +1, and current y.

What cell would that be?

What would current x, and current y+1 be?

Current x-1, and current y?

Current x, and current y-1?

Wouldn't that essentially check all 4 cells around the current cell?

And say what if one of those cells returned the value of zero instead of 1.

Would that give you any ideas as far as what to do?

Now what if you do compare at xy, and compare what the value was for the next xy, or cell? Say for example current x +1, and current y.

What cell would that be?

What would current x, and current y+1 be?

Current x-1, and current y?

Current x, and current y-1?

Wouldn't that essentially check all 4 cells around the current cell?

And say what if one of those cells returned the value of zero instead of 1.

Would that give you any ideas as far as what to do?

**Posts:**8,397**Reputation:**113,988

B

171
S

50
G

180
Don't get snippy, besides I think the word you are looking for is enclosed,or included not inclused.

A hole would be defined as a current value of zero,__and__ current x+1, current y with a value of 1, and current x, current y-1 with a value of 1, and current x-1, current y with a value of 1, and current x, currenty-1 with a value of 1.

That's my definition of a hole with all 4 side with a wall.

You want that definition__and__ what other definitions?newt 2012-12-30 14:45:17

A hole would be defined as a current value of zero,

That's my definition of a hole with all 4 side with a wall.

You want that definition

**Posts:**8,397**Reputation:**113,988

B

171
S

50
G

180
If you want ... I made an algorithm that I can't get going on C2

For Each Elements (X,Y)

- Compare : CurrValue < 8.25

-- ( I'm stuck after dat >.< )

I could make another array and do that all round but I don't know how to do it efficiently ...Whiteclaws 2012-12-30 14:43:45

For Each Elements (X,Y)

- Compare : CurrValue < 8.25

-- ( I'm stuck after dat >.< )

I could make another array and do that all round but I don't know how to do it efficiently ...

**Posts:**2,247**Reputation:**17,471

B

42
S

17
G

17
**Posts:**2,247**Reputation:**17,471

B

42
S

17
G

17
16 posts
• Page **1** of **2** • **1**, 2

## Who is online |

Users browsing this forum: jezjones24, MrQuickGame and 10 guests |