Skip to content

Instantly share code, notes, and snippets.

@MP0w
Created April 27, 2014 17:37
Show Gist options
  • Save MP0w/11351182 to your computer and use it in GitHub Desktop.
Save MP0w/11351182 to your computer and use it in GitHub Desktop.
2048 is not enough...
// cheat in the game 2048
// cheat is not funny so don't compile to cheat
// so why I did?
// what is funny is to make the cheat, not to play with it =)
// how to get headers of App Store Apps ?
// https://github.com/MP0w/dumpdecrypted
@interface ViewController: NSObject
- (void)cheat;
@end
%hook ViewController
- (void)rightSwipeHandle:(id)fp8{
[self cheat];
%orig;
}
- (void)leftSwipeHandle:(id)fp8{
[self cheat];
%orig;
}
- (void)downSwipeHandle:(id)fp8{
[self cheat];
%orig;
}
- (void)upSwipeHandle:(id)fp8{
[self cheat];
%orig;
}
%new
- (void)cheat{
NSMutableArray *arr=[self valueForKey:@"theCubeTab"];
for (NSMutableArray *subarr in arr){
if([[subarr lastObject]isKindOfClass:[%c(UIView) class]]){
[subarr removeObjectAtIndex:0];
[subarr insertObject:@"32768" atIndex:0]; // or whatever you want
}
}
}
%end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment