Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Game Development

Reply
 
LinkBack Thread Tools Display Modes
Old 06-07-2010, 03:28 PM   #1 (permalink)
Registered Member
 
Join Date: Jun 2010
Posts: 3
Lenny is on a distinguished road
Default puzzle game winner detection... weird array problem

I'm making a game that fills the playing field with square 50pixel blocks. There are 6 types of blocks (0-5) the play field is 6 across and 9 high. The goal is to match them by type. Everything was going great until I got to the point of checking for matches and making them disappear once matches are found.

The problem (and it's really weird) is I loop through my sprites and store them in an array... then when I access they array again the data changes. Nothing else is using this array this is the ONLY code that references it. Does anyone have any insight that could help me?

Some of the tags are correct and when they get passed correctly my logic for finding matches functions very well. However, some of them change between when they are stored in the array and when they are recalled. The 8th column is almost always wrong when it is loaded. It is VERY unpredictable and I am VERY lost... please help...

I've included my code and a log from a test run... In this example log...
8th column tags when stored: 3, 1, 0, 3, 3, 1
8th column tags when recalled: 1, 3, 3, 1, 0, 0

Here is the code:

Code:
- (void) checkMatchingBlocks
{
	//load sprite sheet
	CCSpriteSheet *sheet = (CCSpriteSheet*) [self getChildByTag:kTagAtlasSpriteSheet];

	//sprites to destroy
	bool *deleteMatrix[5][8];

	//list of tags
	int tagMatrix[5][8];

	//load sprites into matrix
	for (CCNode *element in [sheet children])
	{
		int xGPos = element.position.x/50;
		int yGPos = element.position.y/50;			

		//SpriteMatrix[xGPos][yGPos]=element;
		tagMatrix[xGPos][yGPos]=element.tag;
		NSLog(@"tags: %i=%i -- %i,%i",tagMatrix[xGPos][yGPos],element.tag,xGPos,yGPos);
	}

	// search matrix and mark for deletion
	// Search through matrix for 3 or more matching items
	// searches for horizontal matches only
	for(int yy=0;yy<9;yy++){
		sameCount=0;
		for(int xx=1;xx<6;xx++){
			//NSLog(@"coords: %i,%i",xx,yy);
			int tagA=(int)tagMatrix[xx][yy];
			int tagB=(int)tagMatrix[xx-1][yy];
			if(tagA==tagB){
				sameCount++;
				NSLog(@"S-sameCount: %i ts: %i,%i xy: %i,%i",sameCount,tagA,tagB,xx,yy);
			}else{
				sameCount=0;
				NSLog(@"D-sameCount: %i ts: %i,%i xy: %i,%i",sameCount,tagA,tagB,xx,yy);
			}

			if(sameCount==2){
				NSLog(@"delete Start: %i %i %i ... %i",xx,xx-1,xx-2,yy);
				deleteMatrix[xx][yy]=(bool*)true;
				deleteMatrix[(xx-1)][yy]=(bool*)true;
				deleteMatrix[(xx-2)][yy]=(bool*)true;
			}

			if(sameCount>2){
				NSLog(@"SetDelete: %i,%i",xx,yy);
				deleteMatrix[xx][yy]=(bool*)true;
			}

		}
	}	

	// output items marked for deletion
	for(int yy=0;yy<9;yy++){
		for(int xx=0;xx<6;xx++){
			if(deleteMatrix[xx][yy]==(bool*)true)
				NSLog(@"delete: %i,%i",xx,yy);
		}
	}
}

I'll attach the log as a comment


Thank you in advance

Lenny
Lenny is offline   Reply With Quote
Old 06-07-2010, 03:29 PM   #2 (permalink)
Registered Member
 
Join Date: Jun 2010
Posts: 3
Lenny is on a distinguished road
Default Log output from test run

Here is the log output:
When looking through it be aware of the following...
- the tags in the top group could be listed out of order as they're listed in the order of the sprites in the sheet
- the tags in the bottom group skip the first 1 as I start at 1 instead of 0 in the loop and check it against xx-1 for a match
- x and y are in the position in the game grid (0-5 , 0-8)

Heres the formats...
tags: tag = (tag from array) -- (x),(y)
sameCount: (count matched) ts: (tag of current), (tag of x-1) xy: (x),(y)

Code:
2010-06-06 18:32:31.308 ShapesGame[1373:207] tags: 3=3 -- 0,8
2010-06-06 18:32:31.309 ShapesGame[1373:207] tags: 1=1 -- 1,8
2010-06-06 18:32:31.309 ShapesGame[1373:207] tags: 0=0 -- 2,8
2010-06-06 18:32:31.310 ShapesGame[1373:207] tags: 3=3 -- 3,8
2010-06-06 18:32:31.311 ShapesGame[1373:207] tags: 3=3 -- 4,8
2010-06-06 18:32:31.311 ShapesGame[1373:207] tags: 1=1 -- 5,8
2010-06-06 18:32:31.312 ShapesGame[1373:207] tags: 2=2 -- 0,7
2010-06-06 18:32:31.315 ShapesGame[1373:207] tags: 2=2 -- 1,7
2010-06-06 18:32:31.318 ShapesGame[1373:207] tags: 2=2 -- 2,7
2010-06-06 18:32:31.321 ShapesGame[1373:207] tags: 0=0 -- 3,7
2010-06-06 18:32:31.321 ShapesGame[1373:207] tags: 2=2 -- 4,7
2010-06-06 18:32:31.321 ShapesGame[1373:207] tags: 2=2 -- 5,7
2010-06-06 18:32:31.322 ShapesGame[1373:207] tags: 1=1 -- 0,6
2010-06-06 18:32:31.322 ShapesGame[1373:207] tags: 1=1 -- 1,6
2010-06-06 18:32:31.323 ShapesGame[1373:207] tags: 2=2 -- 2,6
2010-06-06 18:32:31.323 ShapesGame[1373:207] tags: 3=3 -- 3,6
2010-06-06 18:32:31.326 ShapesGame[1373:207] tags: 1=1 -- 4,6
2010-06-06 18:32:31.327 ShapesGame[1373:207] tags: 3=3 -- 5,6
2010-06-06 18:32:31.328 ShapesGame[1373:207] tags: 2=2 -- 3,5
2010-06-06 18:32:31.329 ShapesGame[1373:207] tags: 0=0 -- 0,5
2010-06-06 18:32:31.330 ShapesGame[1373:207] tags: 3=3 -- 1,5
2010-06-06 18:32:31.331 ShapesGame[1373:207] tags: 1=1 -- 2,5
2010-06-06 18:32:31.331 ShapesGame[1373:207] tags: 2=2 -- 4,5
2010-06-06 18:32:31.332 ShapesGame[1373:207] tags: 2=2 -- 5,5
2010-06-06 18:32:31.332 ShapesGame[1373:207] tags: 2=2 -- 0,4
2010-06-06 18:32:31.333 ShapesGame[1373:207] tags: 3=3 -- 1,4
2010-06-06 18:32:31.333 ShapesGame[1373:207] tags: 3=3 -- 2,4
2010-06-06 18:32:31.334 ShapesGame[1373:207] tags: 2=2 -- 3,4
2010-06-06 18:32:31.335 ShapesGame[1373:207] tags: 1=1 -- 4,4
2010-06-06 18:32:31.336 ShapesGame[1373:207] tags: 0=0 -- 5,4
2010-06-06 18:32:31.336 ShapesGame[1373:207] tags: 1=1 -- 0,3
2010-06-06 18:32:31.337 ShapesGame[1373:207] tags: 0=0 -- 1,3
2010-06-06 18:32:31.337 ShapesGame[1373:207] tags: 0=0 -- 2,3
2010-06-06 18:32:31.338 ShapesGame[1373:207] tags: 1=1 -- 4,3
2010-06-06 18:32:31.338 ShapesGame[1373:207] tags: 0=0 -- 3,3
2010-06-06 18:32:31.341 ShapesGame[1373:207] tags: 2=2 -- 5,3
2010-06-06 18:32:31.342 ShapesGame[1373:207] tags: 3=3 -- 0,2
2010-06-06 18:32:31.343 ShapesGame[1373:207] tags: 0=0 -- 1,2
2010-06-06 18:32:31.344 ShapesGame[1373:207] tags: 0=0 -- 2,2
2010-06-06 18:32:31.344 ShapesGame[1373:207] tags: 3=3 -- 3,2
2010-06-06 18:32:31.345 ShapesGame[1373:207] tags: 2=2 -- 4,2
2010-06-06 18:32:31.345 ShapesGame[1373:207] tags: 2=2 -- 5,2
2010-06-06 18:32:31.346 ShapesGame[1373:207] tags: 1=1 -- 0,1
2010-06-06 18:32:31.347 ShapesGame[1373:207] tags: 0=0 -- 1,1
2010-06-06 18:32:31.348 ShapesGame[1373:207] tags: 3=3 -- 2,1
2010-06-06 18:32:31.349 ShapesGame[1373:207] tags: 0=0 -- 3,1
2010-06-06 18:32:31.350 ShapesGame[1373:207] tags: 2=2 -- 4,1
2010-06-06 18:32:31.353 ShapesGame[1373:207] tags: 2=2 -- 5,1
2010-06-06 18:32:31.353 ShapesGame[1373:207] tags: 0=0 -- 0,0
2010-06-06 18:32:31.353 ShapesGame[1373:207] tags: 1=1 -- 1,0
2010-06-06 18:32:31.354 ShapesGame[1373:207] tags: 3=3 -- 2,0
2010-06-06 18:32:31.354 ShapesGame[1373:207] tags: 3=3 -- 3,0
2010-06-06 18:32:31.356 ShapesGame[1373:207] tags: 1=1 -- 4,0
2010-06-06 18:32:31.356 ShapesGame[1373:207] tags: 3=3 -- 5,0
2010-06-06 18:32:31.357 ShapesGame[1373:207] D-sameCount: 0 ts: 1,0 xy: 1,0
2010-06-06 18:32:31.358 ShapesGame[1373:207] D-sameCount: 0 ts: 3,1 xy: 2,0
2010-06-06 18:32:31.358 ShapesGame[1373:207] S-sameCount: 1 ts: 3,3 xy: 3,0
2010-06-06 18:32:31.359 ShapesGame[1373:207] D-sameCount: 0 ts: 1,3 xy: 4,0
2010-06-06 18:32:31.359 ShapesGame[1373:207] D-sameCount: 0 ts: 0,1 xy: 5,0
2010-06-06 18:32:31.360 ShapesGame[1373:207] D-sameCount: 0 ts: 0,1 xy: 1,1
2010-06-06 18:32:31.360 ShapesGame[1373:207] D-sameCount: 0 ts: 3,0 xy: 2,1
2010-06-06 18:32:31.363 ShapesGame[1373:207] D-sameCount: 0 ts: 0,3 xy: 3,1
2010-06-06 18:32:31.364 ShapesGame[1373:207] D-sameCount: 0 ts: 2,0 xy: 4,1
2010-06-06 18:32:31.364 ShapesGame[1373:207] D-sameCount: 0 ts: 0,2 xy: 5,1
2010-06-06 18:32:31.365 ShapesGame[1373:207] D-sameCount: 0 ts: 0,3 xy: 1,2
2010-06-06 18:32:31.365 ShapesGame[1373:207] S-sameCount: 1 ts: 0,0 xy: 2,2
2010-06-06 18:32:31.366 ShapesGame[1373:207] D-sameCount: 0 ts: 3,0 xy: 3,2
2010-06-06 18:32:31.367 ShapesGame[1373:207] D-sameCount: 0 ts: 2,3 xy: 4,2
2010-06-06 18:32:31.368 ShapesGame[1373:207] D-sameCount: 0 ts: 0,2 xy: 5,2
2010-06-06 18:32:31.369 ShapesGame[1373:207] D-sameCount: 0 ts: 0,1 xy: 1,3
2010-06-06 18:32:31.370 ShapesGame[1373:207] S-sameCount: 1 ts: 0,0 xy: 2,3
2010-06-06 18:32:31.370 ShapesGame[1373:207] S-sameCount: 2 ts: 0,0 xy: 3,3
2010-06-06 18:32:31.371 ShapesGame[1373:207] delete Start: 3 2 1 ... 3
2010-06-06 18:32:31.372 ShapesGame[1373:207] D-sameCount: 0 ts: 1,0 xy: 4,3
2010-06-06 18:32:31.372 ShapesGame[1373:207] D-sameCount: 0 ts: 0,1 xy: 5,3
2010-06-06 18:32:31.373 ShapesGame[1373:207] D-sameCount: 0 ts: 3,2 xy: 1,4
2010-06-06 18:32:31.374 ShapesGame[1373:207] S-sameCount: 1 ts: 3,3 xy: 2,4
2010-06-06 18:32:31.374 ShapesGame[1373:207] D-sameCount: 0 ts: 2,3 xy: 3,4
2010-06-06 18:32:31.376 ShapesGame[1373:207] D-sameCount: 0 ts: 1,2 xy: 4,4
2010-06-06 18:32:31.377 ShapesGame[1373:207] D-sameCount: 0 ts: 0,1 xy: 5,4
2010-06-06 18:32:31.377 ShapesGame[1373:207] D-sameCount: 0 ts: 3,0 xy: 1,5
2010-06-06 18:32:31.378 ShapesGame[1373:207] D-sameCount: 0 ts: 1,3 xy: 2,5
2010-06-06 18:32:31.378 ShapesGame[1373:207] D-sameCount: 0 ts: 2,1 xy: 3,5
2010-06-06 18:32:31.379 ShapesGame[1373:207] S-sameCount: 1 ts: 2,2 xy: 4,5
2010-06-06 18:32:31.379 ShapesGame[1373:207] D-sameCount: 0 ts: 0,2 xy: 5,5
2010-06-06 18:32:31.380 ShapesGame[1373:207] S-sameCount: 1 ts: 1,1 xy: 1,6
2010-06-06 18:32:31.380 ShapesGame[1373:207] D-sameCount: 0 ts: 2,1 xy: 2,6
2010-06-06 18:32:31.381 ShapesGame[1373:207] D-sameCount: 0 ts: 3,2 xy: 3,6
2010-06-06 18:32:31.382 ShapesGame[1373:207] D-sameCount: 0 ts: 1,3 xy: 4,6
2010-06-06 18:32:31.383 ShapesGame[1373:207] D-sameCount: 0 ts: 0,1 xy: 5,6
2010-06-06 18:32:31.383 ShapesGame[1373:207] S-sameCount: 1 ts: 2,2 xy: 1,7
2010-06-06 18:32:31.384 ShapesGame[1373:207] S-sameCount: 2 ts: 2,2 xy: 2,7
2010-06-06 18:32:31.385 ShapesGame[1373:207] delete Start: 2 1 0 ... 7
2010-06-06 18:32:31.386 ShapesGame[1373:207] D-sameCount: 0 ts: 0,2 xy: 3,7
2010-06-06 18:32:31.386 ShapesGame[1373:207] D-sameCount: 0 ts: 2,0 xy: 4,7
2010-06-06 18:32:31.388 ShapesGame[1373:207] D-sameCount: 0 ts: 1,2 xy: 5,7
2010-06-06 18:32:31.389 ShapesGame[1373:207] D-sameCount: 0 ts: 3,1 xy: 1,8
2010-06-06 18:32:31.390 ShapesGame[1373:207] S-sameCount: 1 ts: 3,3 xy: 2,8
2010-06-06 18:32:31.391 ShapesGame[1373:207] D-sameCount: 0 ts: 1,3 xy: 3,8
2010-06-06 18:32:31.391 ShapesGame[1373:207] D-sameCount: 0 ts: 0,1 xy: 4,8
2010-06-06 18:32:31.392 ShapesGame[1373:207] S-sameCount: 1 ts: 0,0 xy: 5,8
2010-06-06 18:32:31.392 ShapesGame[1373:207] delete: 1,3
2010-06-06 18:32:31.396 ShapesGame[1373:207] delete: 2,3
2010-06-06 18:32:31.399 ShapesGame[1373:207] delete: 3,3
2010-06-06 18:32:31.399 ShapesGame[1373:207] delete: 0,7
2010-06-06 18:32:31.400 ShapesGame[1373:207] delete: 1,7
2010-06-06 18:32:31.401 ShapesGame[1373:207] delete: 2,7
Lenny is offline   Reply With Quote
Old 06-07-2010, 03:31 PM   #3 (permalink)
Registered Member
 
Join Date: Jun 2010
Posts: 3
Lenny is on a distinguished road
Default Another Test Just in case

Here is another test run... Figured it might help to see it ran twice...

Again the blocks with y coordinate 8 are completely inconsistent... I'm so confused.

Tags change this time form 0,1,3,2,3,0 to 2,0,0,3,1,0

BTW.. the first set of tags is correct (they line up with the correct graphics on the screen)

Here is just the REALLY weird part:

Code:
2010-06-07 15:16:22.375 ShapesGame[1405:207] tags: 0=0 -- 0,8
2010-06-07 15:16:22.376 ShapesGame[1405:207] tags: 1=1 -- 1,8
2010-06-07 15:16:22.376 ShapesGame[1405:207] tags: 3=3 -- 2,8
2010-06-07 15:16:22.377 ShapesGame[1405:207] tags: 2=2 -- 3,8
2010-06-07 15:16:22.377 ShapesGame[1405:207] tags: 3=3 -- 4,8
2010-06-07 15:16:22.378 ShapesGame[1405:207] tags: 0=0 -- 5,8
.........
2010-06-07 15:16:22.422 ShapesGame[1405:207] D-sameCount: 0 ts: 0,2 xy: 1,8
2010-06-07 15:16:22.423 ShapesGame[1405:207] S-sameCount: 1 ts: 0,0 xy: 2,8
2010-06-07 15:16:22.423 ShapesGame[1405:207] D-sameCount: 0 ts: 3,0 xy: 3,8
2010-06-07 15:16:22.424 ShapesGame[1405:207] D-sameCount: 0 ts: 1,3 xy: 4,8
2010-06-07 15:16:22.424 ShapesGame[1405:207] D-sameCount: 0 ts: 0,1 xy: 5,8

Here is the full log dump from this one...


Code:
2010-06-07 15:16:22.375 ShapesGame[1405:207] tags: 0=0 -- 0,8
2010-06-07 15:16:22.376 ShapesGame[1405:207] tags: 1=1 -- 1,8
2010-06-07 15:16:22.376 ShapesGame[1405:207] tags: 3=3 -- 2,8
2010-06-07 15:16:22.377 ShapesGame[1405:207] tags: 2=2 -- 3,8
2010-06-07 15:16:22.377 ShapesGame[1405:207] tags: 3=3 -- 4,8
2010-06-07 15:16:22.378 ShapesGame[1405:207] tags: 0=0 -- 5,8
2010-06-07 15:16:22.378 ShapesGame[1405:207] tags: 2=2 -- 0,7
2010-06-07 15:16:22.379 ShapesGame[1405:207] tags: 3=3 -- 1,7
2010-06-07 15:16:22.379 ShapesGame[1405:207] tags: 3=3 -- 2,7
2010-06-07 15:16:22.380 ShapesGame[1405:207] tags: 3=3 -- 3,7
2010-06-07 15:16:22.380 ShapesGame[1405:207] tags: 3=3 -- 4,7
2010-06-07 15:16:22.381 ShapesGame[1405:207] tags: 2=2 -- 5,7
2010-06-07 15:16:22.381 ShapesGame[1405:207] tags: 1=1 -- 0,6
2010-06-07 15:16:22.381 ShapesGame[1405:207] tags: 2=2 -- 1,6
2010-06-07 15:16:22.382 ShapesGame[1405:207] tags: 3=3 -- 2,6
2010-06-07 15:16:22.382 ShapesGame[1405:207] tags: 2=2 -- 3,6
2010-06-07 15:16:22.383 ShapesGame[1405:207] tags: 3=3 -- 4,6
2010-06-07 15:16:22.383 ShapesGame[1405:207] tags: 0=0 -- 5,6
2010-06-07 15:16:22.383 ShapesGame[1405:207] tags: 1=1 -- 0,5
2010-06-07 15:16:22.384 ShapesGame[1405:207] tags: 1=1 -- 1,5
2010-06-07 15:16:22.384 ShapesGame[1405:207] tags: 0=0 -- 2,5
2010-06-07 15:16:22.385 ShapesGame[1405:207] tags: 2=2 -- 3,5
2010-06-07 15:16:22.385 ShapesGame[1405:207] tags: 2=2 -- 4,5
2010-06-07 15:16:22.386 ShapesGame[1405:207] tags: 0=0 -- 5,5
2010-06-07 15:16:22.386 ShapesGame[1405:207] tags: 0=0 -- 0,4
2010-06-07 15:16:22.387 ShapesGame[1405:207] tags: 1=1 -- 3,4
2010-06-07 15:16:22.387 ShapesGame[1405:207] tags: 3=3 -- 1,4
2010-06-07 15:16:22.387 ShapesGame[1405:207] tags: 0=0 -- 2,4
2010-06-07 15:16:22.388 ShapesGame[1405:207] tags: 1=1 -- 4,4
2010-06-07 15:16:22.388 ShapesGame[1405:207] tags: 1=1 -- 5,4
2010-06-07 15:16:22.389 ShapesGame[1405:207] tags: 3=3 -- 0,3
2010-06-07 15:16:22.389 ShapesGame[1405:207] tags: 3=3 -- 1,3
2010-06-07 15:16:22.389 ShapesGame[1405:207] tags: 1=1 -- 2,3
2010-06-07 15:16:22.390 ShapesGame[1405:207] tags: 1=1 -- 3,3
2010-06-07 15:16:22.390 ShapesGame[1405:207] tags: 1=1 -- 4,3
2010-06-07 15:16:22.391 ShapesGame[1405:207] tags: 2=2 -- 5,3
2010-06-07 15:16:22.391 ShapesGame[1405:207] tags: 0=0 -- 0,2
2010-06-07 15:16:22.392 ShapesGame[1405:207] tags: 0=0 -- 1,2
2010-06-07 15:16:22.392 ShapesGame[1405:207] tags: 0=0 -- 2,2
2010-06-07 15:16:22.393 ShapesGame[1405:207] tags: 0=0 -- 3,2
2010-06-07 15:16:22.393 ShapesGame[1405:207] tags: 1=1 -- 4,2
2010-06-07 15:16:22.393 ShapesGame[1405:207] tags: 1=1 -- 5,2
2010-06-07 15:16:22.394 ShapesGame[1405:207] tags: 3=3 -- 0,1
2010-06-07 15:16:22.394 ShapesGame[1405:207] tags: 3=3 -- 1,1
2010-06-07 15:16:22.395 ShapesGame[1405:207] tags: 3=3 -- 2,1
2010-06-07 15:16:22.395 ShapesGame[1405:207] tags: 2=2 -- 3,1
2010-06-07 15:16:22.396 ShapesGame[1405:207] tags: 0=0 -- 4,1
2010-06-07 15:16:22.396 ShapesGame[1405:207] tags: 1=1 -- 5,1
2010-06-07 15:16:22.397 ShapesGame[1405:207] tags: 3=3 -- 0,0
2010-06-07 15:16:22.397 ShapesGame[1405:207] tags: 2=2 -- 1,0
2010-06-07 15:16:22.398 ShapesGame[1405:207] tags: 0=0 -- 2,0
2010-06-07 15:16:22.398 ShapesGame[1405:207] tags: 0=0 -- 3,0
2010-06-07 15:16:22.399 ShapesGame[1405:207] tags: 3=3 -- 4,0
2010-06-07 15:16:22.399 ShapesGame[1405:207] tags: 1=1 -- 5,0
2010-06-07 15:16:22.400 ShapesGame[1405:207] D-sameCount: 0 ts: 2,3 xy: 1,0
2010-06-07 15:16:22.401 ShapesGame[1405:207] D-sameCount: 0 ts: 0,2 xy: 2,0
2010-06-07 15:16:22.401 ShapesGame[1405:207] S-sameCount: 1 ts: 0,0 xy: 3,0
2010-06-07 15:16:22.402 ShapesGame[1405:207] D-sameCount: 0 ts: 3,0 xy: 4,0
2010-06-07 15:16:22.402 ShapesGame[1405:207] D-sameCount: 0 ts: 1,3 xy: 5,0
2010-06-07 15:16:22.403 ShapesGame[1405:207] S-sameCount: 1 ts: 3,3 xy: 1,1
2010-06-07 15:16:22.403 ShapesGame[1405:207] S-sameCount: 2 ts: 3,3 xy: 2,1
2010-06-07 15:16:22.403 ShapesGame[1405:207] delete Start: 2 1 0 ... 1
2010-06-07 15:16:22.404 ShapesGame[1405:207] D-sameCount: 0 ts: 2,3 xy: 3,1
2010-06-07 15:16:22.404 ShapesGame[1405:207] D-sameCount: 0 ts: 0,2 xy: 4,1
2010-06-07 15:16:22.405 ShapesGame[1405:207] D-sameCount: 0 ts: 1,0 xy: 5,1
2010-06-07 15:16:22.405 ShapesGame[1405:207] S-sameCount: 1 ts: 0,0 xy: 1,2
2010-06-07 15:16:22.406 ShapesGame[1405:207] S-sameCount: 2 ts: 0,0 xy: 2,2
2010-06-07 15:16:22.406 ShapesGame[1405:207] delete Start: 2 1 0 ... 2
2010-06-07 15:16:22.406 ShapesGame[1405:207] S-sameCount: 3 ts: 0,0 xy: 3,2
2010-06-07 15:16:22.407 ShapesGame[1405:207] SetDelete: 3,2
2010-06-07 15:16:22.407 ShapesGame[1405:207] D-sameCount: 0 ts: 1,0 xy: 4,2
2010-06-07 15:16:22.408 ShapesGame[1405:207] S-sameCount: 1 ts: 1,1 xy: 5,2
2010-06-07 15:16:22.408 ShapesGame[1405:207] S-sameCount: 1 ts: 3,3 xy: 1,3
2010-06-07 15:16:22.409 ShapesGame[1405:207] D-sameCount: 0 ts: 1,3 xy: 2,3
2010-06-07 15:16:22.409 ShapesGame[1405:207] S-sameCount: 1 ts: 1,1 xy: 3,3
2010-06-07 15:16:22.410 ShapesGame[1405:207] S-sameCount: 2 ts: 1,1 xy: 4,3
2010-06-07 15:16:22.410 ShapesGame[1405:207] delete Start: 4 3 2 ... 3
2010-06-07 15:16:22.411 ShapesGame[1405:207] D-sameCount: 0 ts: 2,1 xy: 5,3
2010-06-07 15:16:22.411 ShapesGame[1405:207] D-sameCount: 0 ts: 3,0 xy: 1,4
2010-06-07 15:16:22.412 ShapesGame[1405:207] D-sameCount: 0 ts: 0,3 xy: 2,4
2010-06-07 15:16:22.412 ShapesGame[1405:207] D-sameCount: 0 ts: 1,0 xy: 3,4
2010-06-07 15:16:22.412 ShapesGame[1405:207] S-sameCount: 1 ts: 1,1 xy: 4,4
2010-06-07 15:16:22.413 ShapesGame[1405:207] S-sameCount: 2 ts: 1,1 xy: 5,4
2010-06-07 15:16:22.413 ShapesGame[1405:207] delete Start: 5 4 3 ... 4
2010-06-07 15:16:22.414 ShapesGame[1405:207] S-sameCount: 1 ts: 1,1 xy: 1,5
2010-06-07 15:16:22.414 ShapesGame[1405:207] D-sameCount: 0 ts: 0,1 xy: 2,5
2010-06-07 15:16:22.415 ShapesGame[1405:207] D-sameCount: 0 ts: 2,0 xy: 3,5
2010-06-07 15:16:22.416 ShapesGame[1405:207] S-sameCount: 1 ts: 2,2 xy: 4,5
2010-06-07 15:16:22.416 ShapesGame[1405:207] D-sameCount: 0 ts: 0,2 xy: 5,5
2010-06-07 15:16:22.417 ShapesGame[1405:207] D-sameCount: 0 ts: 2,1 xy: 1,6
2010-06-07 15:16:22.417 ShapesGame[1405:207] D-sameCount: 0 ts: 3,2 xy: 2,6
2010-06-07 15:16:22.418 ShapesGame[1405:207] D-sameCount: 0 ts: 2,3 xy: 3,6
2010-06-07 15:16:22.418 ShapesGame[1405:207] D-sameCount: 0 ts: 3,2 xy: 4,6
2010-06-07 15:16:22.419 ShapesGame[1405:207] D-sameCount: 0 ts: 0,3 xy: 5,6
2010-06-07 15:16:22.419 ShapesGame[1405:207] D-sameCount: 0 ts: 3,2 xy: 1,7
2010-06-07 15:16:22.420 ShapesGame[1405:207] S-sameCount: 1 ts: 3,3 xy: 2,7
2010-06-07 15:16:22.420 ShapesGame[1405:207] S-sameCount: 2 ts: 3,3 xy: 3,7
2010-06-07 15:16:22.421 ShapesGame[1405:207] delete Start: 3 2 1 ... 7
2010-06-07 15:16:22.421 ShapesGame[1405:207] S-sameCount: 3 ts: 3,3 xy: 4,7
2010-06-07 15:16:22.421 ShapesGame[1405:207] SetDelete: 4,7
2010-06-07 15:16:22.422 ShapesGame[1405:207] D-sameCount: 0 ts: 2,3 xy: 5,7
2010-06-07 15:16:22.422 ShapesGame[1405:207] D-sameCount: 0 ts: 0,2 xy: 1,8
2010-06-07 15:16:22.423 ShapesGame[1405:207] S-sameCount: 1 ts: 0,0 xy: 2,8
2010-06-07 15:16:22.423 ShapesGame[1405:207] D-sameCount: 0 ts: 3,0 xy: 3,8
2010-06-07 15:16:22.424 ShapesGame[1405:207] D-sameCount: 0 ts: 1,3 xy: 4,8
2010-06-07 15:16:22.424 ShapesGame[1405:207] D-sameCount: 0 ts: 0,1 xy: 5,8
2010-06-07 15:16:22.424 ShapesGame[1405:207] delete: 0,1
2010-06-07 15:16:22.425 ShapesGame[1405:207] delete: 1,1
2010-06-07 15:16:22.425 ShapesGame[1405:207] delete: 2,1
2010-06-07 15:16:22.426 ShapesGame[1405:207] delete: 0,2
2010-06-07 15:16:22.426 ShapesGame[1405:207] delete: 1,2
2010-06-07 15:16:22.427 ShapesGame[1405:207] delete: 2,2
2010-06-07 15:16:22.427 ShapesGame[1405:207] delete: 3,2
2010-06-07 15:16:22.428 ShapesGame[1405:207] delete: 2,3
2010-06-07 15:16:22.428 ShapesGame[1405:207] delete: 3,3
2010-06-07 15:16:22.429 ShapesGame[1405:207] delete: 4,3
2010-06-07 15:16:22.429 ShapesGame[1405:207] delete: 3,4
2010-06-07 15:16:22.430 ShapesGame[1405:207] delete: 4,4
2010-06-07 15:16:22.431 ShapesGame[1405:207] delete: 5,4
2010-06-07 15:16:22.432 ShapesGame[1405:207] delete: 1,7
2010-06-07 15:16:22.432 ShapesGame[1405:207] delete: 2,7
2010-06-07 15:16:22.433 ShapesGame[1405:207] delete: 3,7
2010-06-07 15:16:22.434 ShapesGame[1405:207] delete: 4,7
Lenny is offline   Reply With Quote
Old 06-09-2010, 02:15 PM   #4 (permalink)
Registered Member
 
bsgnerd's Avatar
 
Join Date: Apr 2009
Posts: 30
bsgnerd is on a distinguished road
Default

I didn't have a lot of time to look over your code but this stuck out to me.

deleteMatrix[(xx-2)][yy]=(bool*)true;

You setup a for loop like this
for xx = 1; xx < 6; xx++

What happens when you subtract -2 from xx when it equals 1?

xx would be equal to -1

Anyway this may never happen but I hope it helps.
bsgnerd is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 405
11 members and 394 guests
7twenty7, ChrisYates, djohnson, Duncan C, gmarro, hussain1982, Kirkout, Retouchable, SLIC, walex, xzoonxoom
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,679
Threads: 94,128
Posts: 402,921
Top Poster: BrianSlick (7,990)
Welcome to our newest member, xzoonxoom
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:05 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0