Skip to content

Commit

Permalink
Add Malek
Browse files Browse the repository at this point in the history
  • Loading branch information
richelbilderbeek committed Dec 15, 2024
1 parent 9ed01f0 commit 84ec81e
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion docs/verksamheter/20241214_julkort/julkort/julkort.pde
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ int enrico_j = -1300;

PImage herman_julgran;

float malekX = 610;
float malekgron = 0;

void setup_herman()
{
herman_julgran = loadImage("herman_julgran.png");
Expand Down Expand Up @@ -64,7 +67,8 @@ void draw_enrico() {
textSize(20);
//background(0);
fill(0); rect(0,0,200,200); //RJCB
fill(255); //RJCB
fill(255); //RJCB
stroke(0); //RJCB
text("merry x-mas", 50, 50);
ellipse(enrico_x, 100, 50, 50);
enrico_x = enrico_x + 2;
Expand Down Expand Up @@ -102,10 +106,27 @@ void draw_herman()
image(herman_julgran, 600, 200, 200, 400);
}

void draw_malek()
{
stroke(malekX - 200, malekgron, random(256));
fill(malekX - 200, malekgron, random(256));
rect(malekX, height - 100, 50, 50, 50);
malekX = malekX + 1;
malekgron = malekgron + 2;
if (malekX > 740)
{
malekX = 610;
}
if (malekgron > 255)
{
malekgron = 0;
}
}

void draw()
{
draw_alfred();
draw_enrico();
draw_herman();
draw_malek();
}

0 comments on commit 84ec81e

Please sign in to comment.