We are about halfway now! You can give a colour 625 points. Only one character you could give points to. Voting ends at Sunday 4th July
A fork of Algicosathlon Day 9 by Tealavender | Laveneal
xxxxxxxxxx
int[] start = {2782,203,18,2159,2028,2930,551,2229,863,1,1781,1527,68,2454,306,1667};
int[] toadd = {769,00,00,614,1794,513,00,1025,00,00,2563,00,00,384,00,1281};
String[] PPoints = {"2786","203","18","2159","2028","2930","551","2229","863","1","1781","1527","68","2454","306","1667"};
String[] names = {"Magenta","Purple","Tan","Orange","Lime","Red","Blue","Lavender","Yellow","Brown","Gray","Navy","Olive","Pink","Cyan","Green"};
int[] waias = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
int[] waiae = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
boolean[] taken = {false,false,false,false,
false,false,false,false,false,false,false,false,
false,false,false,false};
int timer, maxScore, x, y;
int[][] colors = {{255,0,255},{120,0,255},{210,180,140},{255,120,0},{0,255,0},{255,0,0},{0,120,255},{191,128,255},{255,255,0},{130,65,0},{120,120,120},{0,30,145},{120,120,0},{255,100,255},{0,255,255},{0,145,0}};
String[] after = {"st","nd","rd","th","th","th",
"th","th","th","th","th","th","th","th","th","th"};
PFont font;
PFont font2;
int margin = 300;
float perc = 0;
void setup(){
font = loadFont("Gill Sans");
font2 = loadFont("Gill Sans Bold");
size(1280,765);
for(int i = 0; i < 16; i++){
int record = 0;
int recordHolder = 0;
for(int j = 15; j >= 0; j--){
if(start[j] >= record && !taken[j]){
record = start[j];
recordHolder = j;
}
}
taken[recordHolder] = true;
waias[recordHolder] = i;
}
for(int i = 0; i < 16; i++){
taken[i] = false;
}
for(int i = 0; i < 16; i++){
int record = 0;
int recordHolder = 0;
for(int j = 15; j >= 0; j--){
if(start[j]+toadd[j] >= record && !taken[j]){
record = start[j]+toadd[j];
recordHolder = j;
}
}
taken[recordHolder] = true;
waiae[recordHolder] = i;
if(i == 0) maxScore = record;
}
textFont(font,40);
noStroke();
frameRate(50);
// noprotect;
}
void draw(){
background(0);
if(timer < 999999){
fill(0);
rect(0,0,margin,height);
timer++;
textAlign(LEFT);
fill(255);
for(int i = 0; i < 16; i++){
text((i+1)+after[i],93,35+45*i);
}
if(timer < 480){
perc = max((float(timer)-180)/300,0);
}else{
perc = min(max((float(timer)-480)/300,0),1);
perc = -cos(perc*PI)/2+0.5;
}
for(int j = 0; j < 16; j++){
fill(colors[j][0],colors[j][1],colors[j][2]);
if(timer < 480){
x = 0;
y = 45*waias[j];
}else{
x = 0;
y = int((waias[j]+(float(waiae[j])-float(waias[j]))*perc)*45);
}
rect(margin,5+y,x,35);
textAlign(LEFT);
text(names[j],margin+x-90,35+y);
fill(0);
textAlign(RIGHT);
if(timer < 480){
fill(155);
text(addCommas(round((start[j]+toadd[j]*perc))),margin+x+390,35+y);
fill(61);
text(PPoints[j] + "+" + round(toadd[j]*perc),margin+x+255,35+y);
text("Scores",1200,500);
}else{
fill(155);
textFont(font2,40);
text(addCommas(start[j]+toadd[j]),margin+x+390,35+y);
fill(61);
textFont(font,40);
text(PPoints[j] + "+" + toadd[j],margin+x+255,35+y);
text("Scores",1200,500);
}
if(waiae[j] >= 8){
fill(random(255), random(255), random(255));
textFont(font2,44);
textAlign(LEFT);
text("ELIMINATED",690+x,37+y);
textFont(font,40);
}
if(waiae[j] >= 8 && timer > 0 * 0.85){
fill(random(255), random(255), random(255));
textFont(font2,44);
textAlign(LEFT);
text("ELIMINATED",695+x,38.5+y);
textFont(font,40);
}
}
//saveFrame("images\\####.png");
}
}
String addCommas(int n){
String s = n+"";
String output = "";
for(int i = 0; i < s.length(); i++){
if(i >= 1 && (s.length()-i)%3 == 0){
output = output+",";
}
output = output+s.charAt(i);
}
return output;
}