SHOW:
|
|
- or go back to the newest paste.
| 1 | - | int[] start = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
|
| 1 | + | int[] start = {16,9,7,6,7,9,12,11,8,10,9,7,4,6,7,8,2,2,2,1,2,2,3,4,3,0,0,0};
|
| 2 | - | int[] toadd = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
|
| 2 | + | int[] toadd = {0,0,13,0,8,0,6,0,5,7,8,0,0,21,17,0,2,2,2,3,2,1,2,2,2,6,6,6};
|
| 3 | - | String[] names ={"Magenta","Purple","Tan","Orange","Lime","Red","Blue","Lavender","Yellow","Brown","Gray","Navy","Olive","Pink","Cyan","Green"};
|
| 3 | + | String[] names ={"Aarex","Arsenii Ivanov","Baris","ChromaticGamer","Spyonclear","Dima Dino","Dogman Super Fan","DR Paradox","Ege ve Tayfasi HD","Eggman Games","Forest Whispers","Generic Username","Glosswired","GMM","Minderia","Nebula","Moises Martinez","Nermal Cat","Nirvana Supermind","Novaya Studia Uchastnika","Saturn 24","SokolerC Computers","Sonic Le Geek","SITWGOAT","Spriteclad","Talking Hank tAL","Various77","yta"};
|
| 4 | - | int[] waias = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
|
| 4 | + | int[] waias = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27};
|
| 5 | - | int[] waiae = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
|
| 5 | + | int[] waiae = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27};
|
| 6 | boolean[] taken = {false,false,false,false,
| |
| 7 | false,false,false,false,false,false,false,false, | |
| 8 | - | false,false,false,false}; |
| 8 | + | false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false}; |
| 9 | int timer, maxScore, x, y; | |
| 10 | - | int[][] colors = {{255,0,255},{120,0,255},{210,180,140},{255,120,0},{0,255,0},{255,0,0},{0,120,255},{202,145,222},{255,255,0},{130,65,0},{120,120,120},{0,30,145},{120,120,0},{255,100,255},{0,255,255},{0,145,0}};
|
| 10 | + | int[][] colors = {{255,0,255},{120,0,255},{210,180,140},{255,120,0},{120,0,255},{210,180,140},{255,120,0},{0,255,0},{255,0,0},{0,120,255},{202,145,222},{255,255,0},{130,65,0},{120,120,120},{0,30,145},{120,120,0},{255,100,255},{0,255,255},{0,145,0},{255,44,255},{0,55,255},{0,220,0},{255,100,255},{0,255,255},{0,145,0},{255,44,255},{0,55,255},{0,220,0}};
|
| 11 | String[] after = {"st","nd","rd","th","th","th",
| |
| 12 | - | "th","th","th","th","th","th","th","th","th","th"}; |
| 12 | + | "th","th","th","th","th","th","th","th","th","th","th","th","th","th", |
| 13 | "st","nd","rd","th","th","th","th"}; | |
| 14 | PFont font; | |
| 15 | PFont font2; | |
| 16 | int margin = 100; | |
| 17 | float perc = 0; | |
| 18 | - | font = loadFont("Verdana-48.vlw");
|
| 18 | + | |
| 19 | - | font2 = loadFont("Verdana-BoldItalic-48.vlw");
|
| 19 | + | font = loadFont("AppleGaramond-25.vlw");
|
| 20 | font2 = loadFont("AppleGaramondLight-25.vlw");
| |
| 21 | - | for(int i = 0; i < 16; i++){
|
| 21 | + | |
| 22 | for(int i = 0; i < 28; i++){
| |
| 23 | int record = 0; | |
| 24 | - | for(int j = 15; j >= 0; j--){
|
| 24 | + | |
| 25 | for(int j = 27; j >= 0; j--){
| |
| 26 | if(start[j] >= record && !taken[j]){
| |
| 27 | record = start[j]; | |
| 28 | recordHolder = j; | |
| 29 | } | |
| 30 | } | |
| 31 | taken[recordHolder] = true; | |
| 32 | waias[recordHolder] = i; | |
| 33 | - | for(int i = 0; i < 16; i++){
|
| 33 | + | |
| 34 | for(int i = 0; i < 28; i++){
| |
| 35 | taken[i] = false; | |
| 36 | - | for(int i = 0; i < 16; i++){
|
| 36 | + | |
| 37 | for(int i = 0; i < 28; i++){
| |
| 38 | int record = 0; | |
| 39 | - | for(int j = 15; j >= 0; j--){
|
| 39 | + | |
| 40 | for(int j = 27; j >= 0; j--){
| |
| 41 | if(start[j]+toadd[j] >= record && !taken[j]){
| |
| 42 | record = start[j]+toadd[j]; | |
| 43 | recordHolder = j; | |
| 44 | } | |
| 45 | } | |
| 46 | taken[recordHolder] = true; | |
| 47 | waiae[recordHolder] = i; | |
| 48 | if(i == 0) maxScore = record; | |
| 49 | } | |
| 50 | textFont(font,40); | |
| 51 | noStroke(); | |
| 52 | frameRate(60); | |
| 53 | } | |
| 54 | void draw(){
| |
| 55 | background(0); | |
| 56 | if(timer < 1200){
| |
| 57 | fill(80); | |
| 58 | rect(0,0,margin,height); | |
| 59 | timer++; | |
| 60 | textAlign(LEFT); | |
| 61 | - | for(int i = 0; i < 16; i++){
|
| 61 | + | |
| 62 | - | text((i+1)+after[i],margin-93,35+45*i); |
| 62 | + | for(int i = 0; i < 28; i++){
|
| 63 | text((i+1)+after[i],margin-53,22+25*i); | |
| 64 | } | |
| 65 | if(timer < 480){
| |
| 66 | perc = max((float(timer)-180)/300,0); | |
| 67 | }else{
| |
| 68 | perc = min(max((float(timer)-480)/300,0),1); | |
| 69 | perc = -cos(perc*PI)/2+0.5; | |
| 70 | - | for(int j = 0; j < 16; j++){
|
| 70 | + | |
| 71 | for(int j = 0; j < 28; j++){
| |
| 72 | fill(colors[j][0],colors[j][1],colors[j][2]); | |
| 73 | if(timer < 480){
| |
| 74 | - | y = 45*waias[j]; |
| 74 | + | |
| 75 | y = 25*waias[j]; | |
| 76 | }else{
| |
| 77 | - | y = int((waias[j]+(float(waiae[j])-float(waias[j]))*perc)*45); |
| 77 | + | |
| 78 | y = int((waias[j]+(float(waiae[j])-float(waias[j]))*perc)*25); | |
| 79 | - | rect(margin,5+y,x,35); |
| 79 | + | |
| 80 | rect(margin,5+y,x,20); | |
| 81 | - | text(names[j],margin+x+5,35+y); |
| 81 | + | |
| 82 | text(names[j],margin+x+5,24+y); | |
| 83 | fill(0); | |
| 84 | textAlign(RIGHT); | |
| 85 | - | text(addCommas(round((start[j]+toadd[j]*perc))),margin+x,35+y); |
| 85 | + | |
| 86 | text(addCommas(round((start[j]+toadd[j]*perc))),margin+x,24+y); | |
| 87 | - | text(addCommas(start[j]+toadd[j]),margin+x,35+y); |
| 87 | + | |
| 88 | text(addCommas(start[j]+toadd[j]),margin+x,22+y); | |
| 89 | - | if(waiae[j] >= 16){
|
| 89 | + | |
| 90 | if(waiae[j] >= 20){
| |
| 91 | - | textFont(font2,44); |
| 91 | + | |
| 92 | textFont(font2,24); | |
| 93 | - | text("ELIMINATED",names[j].length()*20+130+x,37+y);
|
| 93 | + | |
| 94 | - | textFont(font,40); |
| 94 | + | text("He fired!",names[j].length()*20+130+x,26+y);
|
| 95 | textFont(font,20); | |
| 96 | } | |
| 97 | } | |
| 98 | //saveFrame("images\\####.png");
| |
| 99 | } | |
| 100 | } | |
| 101 | String addCommas(int n){
| |
| 102 | String s = n+""; | |
| 103 | String output = ""; | |
| 104 | for(int i = 0; i < s.length(); i++){
| |
| 105 | if(i >= 1 && (s.length()-i)%3 == 0){
| |
| 106 | output = output+","; | |
| 107 | } | |
| 108 | output = output+s.charAt(i); | |
| 109 | } | |
| 110 | return output; | |
| 111 | } |