Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- else {
- var b:int = r.wave/10;
- max = r.wave*2;
- var sect:int = max/(b+1);
- var cc:int = 0;
- var cs:int = 1;
- for (i = 0;i <= max;i++) {
- cc++;
- if (cc > sect) {
- cwave.push(9);
- cc = 0;
- cs++;
- }
- else {
- var step:Number;
- if (b % 2 == 0) {
- step = (9/sect)*2;
- if (cc > sect/2) { cwave.push(Math.floor(9-((cc-sect/2)*step))); }
- else { cwave.push(Math.floor((cc-1)*step)); }
- }
- else {
- step = 9/sect;
- if (cs % 2 == 0) { cwave.push(Math.ceil(8-((cc-1)*step))); }
- else { cwave.push(Math.floor((cc-1)*step)); }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement