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();

Found something interesting ?

• On-time delivery guarantee
• PhD-level professional writers
• Free Plagiarism Report

• 100% money-back guarantee
• Absolute Privacy & Confidentiality
• High Quality custom-written papers

Related Model Questions

Feel free to peruse our college and university model questions. If any our our assignment tasks interests you, click to place your order. Every paper is written by our professional essay writers from scratch to avoid plagiarism. We guarantee highest quality of work besides delivering your paper on time.

Grab your Discount!

25% Coupon Code: SAVE25
get 25% !!