Skip to content

Commit 84ec81e

Browse files
Add Malek
1 parent 9ed01f0 commit 84ec81e

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

docs/verksamheter/20241214_julkort/julkort/julkort.pde

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ int enrico_j = -1300;
2020

2121
PImage herman_julgran;
2222

23+
float malekX = 610;
24+
float malekgron = 0;
25+
2326
void setup_herman()
2427
{
2528
herman_julgran = loadImage("herman_julgran.png");
@@ -64,7 +67,8 @@ void draw_enrico() {
6467
textSize(20);
6568
//background(0);
6669
fill(0); rect(0,0,200,200); //RJCB
67-
fill(255); //RJCB
70+
fill(255); //RJCB
71+
stroke(0); //RJCB
6872
text("merry x-mas", 50, 50);
6973
ellipse(enrico_x, 100, 50, 50);
7074
enrico_x = enrico_x + 2;
@@ -102,10 +106,27 @@ void draw_herman()
102106
image(herman_julgran, 600, 200, 200, 400);
103107
}
104108

109+
void draw_malek()
110+
{
111+
stroke(malekX - 200, malekgron, random(256));
112+
fill(malekX - 200, malekgron, random(256));
113+
rect(malekX, height - 100, 50, 50, 50);
114+
malekX = malekX + 1;
115+
malekgron = malekgron + 2;
116+
if (malekX > 740)
117+
{
118+
malekX = 610;
119+
}
120+
if (malekgron > 255)
121+
{
122+
malekgron = 0;
123+
}
124+
}
105125

106126
void draw()
107127
{
108128
draw_alfred();
109129
draw_enrico();
110130
draw_herman();
131+
draw_malek();
111132
}

0 commit comments

Comments
 (0)