Closed codingbootcampseu closed 3 years ago
Use the sketch from the previous task.
iceBrush()
200
255
0
100
30px
40px
10px
20px
f
i
You still only draw when the mouse is pressed 💡
Hints
The switch between the different brushes can be done with a if-else statement or with a switch-case statement.
if-else
switch-case
Bonus
Create an eraser brush as well. Any other key pressed than i or f will switch to the erase brush.
Example Solution
Bei mir wollte nur zeichnen wenn "I" oder "F" gedrückt gehalten haben, Fehlersuche war nicht so einfach, aber lösung gefunden und gespeichert :O Puta mierda
Use the sketch from the previous task.
iceBrush()
200
and255
blue0
and100
30px
and40px
on the current mouse position10px
and20px
with a randomized x and y positionf
to switch to the fire brushi
to switch to the ice brushHints
The switch between the different brushes can be done with a
if-else
statement or with aswitch-case
statement.Bonus
Create an eraser brush as well. Any other key pressed than
i
orf
will switch to the erase brush.Example Solution