Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -(int)getTopRightCorner
- {
- id board = [[GameManager sharedGameManager] board];
- int toprow = [board topRow];
- int gridWidth = boardGridX;
- int gridHeight = boardGridY;
- int overthetop = toprow * gridWidth + (gridWidth-1); // this should get us the toprow, rightcorner
- int toprightcorner = gridWidth * (gridHeight+1) - 1; //since we start from 0, need to remove one, had 2 bonus rows, using only one now
- //if not inside map
- while(toprightcorner > overthetop) {
- NSLog(@"looking lower");
- toprightcorner -= gridWidth;
- }
- if (toprightcorner < 0) {
- toprightcorner = -1;
- }
- return toprightcorner;
- }
Add Comment
Please, Sign In to add comment