最新80um筛子孔径是多少代码是多少

关于摇骰子的计数问题,博饼的代码(新手,勿喷...)【java吧】_百度贴吧
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&签到排名:今日本吧第个签到,本吧因你更精彩,明天继续来努力!
本吧签到人数:0成为超级会员,使用一键签到本月漏签0次!成为超级会员,赠送8张补签卡连续签到:天&&累计签到:天超级会员单次开通12个月以上,赠送连续签到卡3张
关注:670,481贴子:
关于摇骰子的计数问题,博饼的代码(新手,勿喷...)收藏
import java.util.*; import java.math.*;public class bobing {
*/ public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println("游戏开始,祝你好运!");
int num[]={0,0,0,0,0,0,0};
//System.out.println("the munber you got are:");测试
for(int i=1;i&=6;i++){
n=1+(int)(Math.random()*5);
//System.out.println(n);这里是产生的随机数进行输出测试!
//System.out.println("the munber:");
/*for(int i=1;i&=6;i++){
System.out.println(num[i]);这里是计算随机数的个数,也用于测试
if(num[4]==4&&num[1]==2)
System.out.println("恭喜你获得了状元--插金花!");
else if(num[4]==6)
System.out.println("恭喜你获得了状元--六杯红!");
else if(num[1]==6)
System.out.println("恭喜你获得了状元--遍地锦!");
else if(num[4]==5&&num[1]==1)
System.out.println("恭喜你获得了状元--五红!");
else if(num[2]==5)
System.out.println("恭喜你获得了状元--五子登科!");
else if(num[4]==4)
System.out.println("恭喜你获得了状元--四点红!");
else if(num[1]==num[2]&&num[2]==num[3]&&num[3]==num[4]&&num[4]==num[5]&&num[5]==num[6])
System.out.println("恭喜你获得了榜眼--对堂!");
else if(num[4]==3)
System.out.println("恭喜你获得了探花--三红!");
else if(num[2]==4)
System.out.println("恭喜你获得了进士--四进!");
else if(num[4]==2)
System.out.println("恭喜你获得了举人--二举!");
else if(num[4]==1)
System.out.println("恭喜你获得了秀才--一秀!");
System.out.println("真遗憾,你什么都没摇到!");
登录百度帐号推荐应用html5游戏掷骰子源码
&!DOCTYPE html&
&& html lang=&en&&
&&title&Throwing 1&/title&
&&script type=&text/javascript&&
&var cwidth = 400;
&var cheight = 300;
&var dicex = 50;
&var dicey = 50;
&var dicewidth = 100;
&var diceheight = 100;
&var dotrad = 6;
&var firstturn =
&function throwdice(){
&var ch = 1+Math.floor(Math.random()*6);
&drawface(ch);
&dx = dicex + 150;
&ch = 1 + Math.floor(Math.random()*6);
&drawface(ch);
&if(firstturn){
&switch(sum){
&document.f.outcome.value=&You Win!&;
&document.f.outcome.value=&You Lose!&;
&document.f.pv.value =
&firstturn =
&document.f.stage.value = &Need follow-up throw.&;
&document.f.outcome.value = &&;
&switch(sum){
&case point:
&document.f.outcome.value = &You Win!&;
&document.f.stage.value = &Back to first throw.&;
&document.f.pv.value = &&;
&firstturn =
&document.f.outcome.value = &You Lose!&;
&document.f.stage.value = &Back to first throw.&;
&document.f.pv.value = &&;
&firstturn =
&function drawface(n){
&ctx = document.getElementById('canvas').getContext('2d');
&ctx.lineWidth = 5;
&ctx.clearRect(dx,dy,dicewidth,diceheight);
&ctx.strokeRect(dx,dy,dicewidth,diceheight);
&ctx.fillStyle = '#;;
&switch(n){
&draw2mid();
&function draw1(){
&ctx.beginPath();
&dotx = dx + 0.5*
&doty = dy + 0.5*
&ctx.arc(dotx,doty,dotrad,0,Math.PI*2,true);
&ctx.closePath();
&ctx.fill()
&function draw2(){
&ctx.beginPath();
&dotx = dx + 3*
&doty = dy + 3*
&ctx.arc(dotx,doty,dotrad,0,Math.PI*2,true);
&dotx = dx + dicewidth - 3*
&doty = dy + diceheight - 3*
&ctx.arc(dotx,doty,dotrad,0,Math.PI*2,true);
&ctx.closePath();
&ctx.fill();
&function draw4(){
&ctx.beginPath();
&dotx = dx + 3*
&doty = dy + 3*
&ctx.arc(dotx,doty,dotrad,0,Math.PI*2,true);
&dotx = dx + dicewidth -3*
&doty = dy + dicewidth -3*
&ctx.arc(dotx,doty,dotrad,0,Math.PI*2,true);
&ctx.closePath();
&ctx.fill();
&ctx.beginPath();
&dotx = dx + 3*
&doty = dy + diceheight - 3*
&ctx.arc(dotx,doty,dotrad,0,Math.PI*2,true);
&dotx = dx + dicewidth - 3*
&doty = dy + 3*
&ctx.arc(dotx,doty,dotrad,0,Math.PI*2,true);
&ctx.closePath();
&ctx.fill();
&function draw2mid(){
ctx.beginPath();
&dotx = dx + 3*
&doty = dy + 0.5*
&ctx.arc(dotx,doty,dotrad,0,Math.PI*2,true);
&dotx = dx + dicewidth - 3*
&doty = dy + 0.5*
&ctx.arc(dotx,doty,dotrad,0,Math.PI*2,true);
&ctx.closePath();
&ctx.fill();
&&/script&
&&canvas id=&canvas& width=&400& height=&300&&
&不支持html5
&&/canvas&
&&button&Throw dice&/button&
&&form name=&f&&
&Stage:&input name=&stage& value=&First Throw& /&&br/&
&Point:&input name=&pv& value=&& /&&br/&
&outcome:&input name=&outcome& value=&& /&}

我要回帖

更多关于 筛子多少目 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信