equal
deleted
inserted
replaced
42 |
42 |
43 self.gameConfig = [gameDictionary objectForKey:@"game_dictionary"]; |
43 self.gameConfig = [gameDictionary objectForKey:@"game_dictionary"]; |
44 isNetGame = [[gameDictionary objectForKey:@"netgame"] boolValue]; |
44 isNetGame = [[gameDictionary objectForKey:@"netgame"] boolValue]; |
45 NSString *path = [gameDictionary objectForKey:@"savefile"]; |
45 NSString *path = [gameDictionary objectForKey:@"savefile"]; |
46 // if path is empty it means i have to create a new file, otherwise i read from that file |
46 // if path is empty it means i have to create a new file, otherwise i read from that file |
47 if ([path isEqualToString:@""] == YES) |
47 if ([path isEqualToString:@""] == YES) { |
48 self.savePath = [SAVES_DIRECTORY() stringByAppendingFormat:@"%@.hws", [[NSDate date] description]]; |
48 NSDateFormatter *outputFormatter = [[NSDateFormatter alloc] init]; |
49 else |
49 [outputFormatter setDateFormat:@"yyyy-MM-dd 'at' HH,mm"]; |
50 self.savePath = [SAVES_DIRECTORY() stringByAppendingString:path]; |
50 NSString *newDateString = [outputFormatter stringFromDate:[NSDate date]]; |
|
51 self.savePath = [SAVES_DIRECTORY() stringByAppendingFormat:@"%@.hws", newDateString]; |
|
52 [outputFormatter release]; |
|
53 } else |
|
54 self.savePath = path; |
51 } |
55 } |
52 return self; |
56 return self; |
53 } |
57 } |
54 |
58 |
55 -(void) dealloc { |
59 -(void) dealloc { |