Hi All, I have a card game where the cards have exact origin points where they are placed on the screen. The cards get swapped a lot and at the end of the game the values get added up.
When the card game starts the cards are in an array and get a tag the correlates to the position in the mixed deck. There are 12 cards so card 7 is index 7 (the first card at index 0 is discarded). So as the cards are laid out the tags are sequential 1,2,3,4.... But the end of the game the cards values are mixed, example 42,12,17,44....
If I can cycle through the NSImageView in the self.view I can retrieve the tag numbers and match them up with the array indexes.
This is just Sudo code below to give an example of what I am looking for.
This may not be possible, but I thought I would ask?
Thanks!
When the card game starts the cards are in an array and get a tag the correlates to the position in the mixed deck. There are 12 cards so card 7 is index 7 (the first card at index 0 is discarded). So as the cards are laid out the tags are sequential 1,2,3,4.... But the end of the game the cards values are mixed, example 42,12,17,44....
If I can cycle through the NSImageView in the self.view I can retrieve the tag numbers and match them up with the array indexes.
This is just Sudo code below to give an example of what I am looking for.
Code:
xLocNumbers = @[@"25",@"150",@"275",@"25",@"150",@"275",@"25",@"150",@"275",@"25",@"150",@"275"];
yLocNumbers = @[@"50",@"50",@"50",@"175",@"175",@"175",@"425",@"425",@"425",@"550",@"550",@"550"];
CGPoint point = CGPointMake([[xLocNumbersobjectAtIndex:0]floatValue], [[yLocNumbersobjectAtIndex:0]floatValue]);
NSImageView *view = (NSImageView*) [self.view viewAtOrigin:point]; // bogus code, just an example.
This may not be possible, but I thought I would ask?
Thanks!