var win = 0; var lose = 0; var draw = 0; var i = 0; var r1; var r2; while (i < 10){ r1 = rnd(5); r2 = rnd(5); log(r1); log(" vs "); log(r2); log("\n"); if (r1 == r2){ draw = draw + 1; } else if(r1 > r2){ win = win + 1; } else{ lose = lose + 1; } i = i + 1; sleep(500); } log("------"); log("\n"); log("win :"); log(win); log("\n"); log("draw:"); log(draw); log("\n"); log("lose:"); log(lose); log("\n");