Guest User

Untitled

a guest
Feb 20th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. nodes = [_representation_ nodesForXPath:@"cells/cell" error:nil];
  2. for( NSXMLNode *node in nodes ) {
  3. NSXMLElement *element = (NSXMLElement *)node;
  4. NSXMLNode *attributeNode;
  5.  
  6. attributeNode = [element attributeForName:@"col"];
  7. int col = [[attributeNode stringValue] intValue];
  8.  
  9. attributeNode = [element attributeForName:@"row"];
  10. int row = [[attributeNode stringValue] intValue];
  11.  
  12. ELHex *hex = [self hexAtColumn:col row:row];
  13. [hex initWithXmlRepresentation:element parent:self player:_player_];
  14. }
Add Comment
Please, Sign In to add comment