on processing.
create a sketch that draws(however you want) 2 dice that are randomly “rolled” when the mouse is pressed.
so you will need some random numbers, and some drawings. when the numbers are rolled, it does the correct drawing
//dice roller with 2 die that you add up the total, mousepressed
//rolls again, visual representation of the dice
//2 random variables
int dieOne,dieTwo;
void setup(){
size(800,600);
}
void draw(){
delay(2000);
dieOne=(int)random(1,7);
dieTwo=(int)random(1,7);
println(dieOne, dieTwo, dieOne+dieTwo);
noLoop();
}
void mousePressed(){
loop();