Created
August 30, 2012 06:52
-
-
Save johnlinvc/3523502 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef struct { | |
int x, | |
int y, | |
int width, | |
int height | |
} rect; | |
static int count = 1; | |
void spiltAndMerge(rect rec){ | |
if(count >= 272) return ; | |
rect new1 , new2; | |
RandomSpiltRect(rec,new1,new2); //random decide a spilt point and draw animation | |
count++; | |
spiltAndMerge(new1); | |
spiltAndMerge(new2); | |
MergeRect(new1,new2); | |
count--; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment