主页 > 知识库 > 网络编程 > JSP/Java >

JAVA打蜜蜂小游戏源码(2)

来源:中国IT实验室 作者:佚名 发表于:2013-07-09 09:47  点击:
for (var upperspc = 0; upperspc downno; upperspc++) { if (missiley == upperspc) { downlf = downlf + blankx[missilex]+|+cr; } else { downlf = downlf+cr; } } if (inplay == 1) { patno = patno + 1; if (p

for (var upperspc = 0; upperspc < downno; upperspc++) {  if (missiley == upperspc) {
  downlf = downlf + blankx[missilex]+"|"+cr;
  } else { downlf = downlf+cr; }
  }
  if (inplay == 1) {
  patno = patno + 1;
  if (patno >= 3) { patno = 1; }
  for (var addline = 1; addline < 5; addline++){
  mestotal[addline] = totalblank;
  rsmiss = "";
  if (missiley == (downno+addline*2-2)) {
  if (blankno <= missilex) {
  hitflag = parseInt((missilex-blankno)/7, 10);
  if (hitflag < 6) {
  if ((missilex - blankno - (hitflag * 7)) >= 1) {
  if ((missilex - blankno - (hitflag * 7)) <= 5) {
  if (faker[(addline * 6) + hitflag - 5] == 1) {
  faker[(addline * 6) + hitflag - 5] = 0;
  missiley = 99;
  }
  }
  }
  }else {
  if (missilex > (blankno + 42)) {
  rsmiss = blankx[missilex - blankno - 42]+"|";
  }
  }
  } else {
  mestotal[addline] = blankx[missilex]+"|";
  if (missilex < (blankno-1)) {
  mestotal[addline] = mestotal[addline]+blankx[blankno-1-missilex];
  }
  }
  }
  for (var addfaker = 1; addfaker < 7; addfaker++) {
  if (faker[(addline*6)+addfaker-6] == 1) {
  mestotal[addline] = mestotal[addline]+face[patno];
  } else { mestotal[addline] = mestotal[addline]+"       "; }
  }
  mestotal[addline] = mestotal[addline]+rsmiss;
  }
  spcf1 = cr;
  spcf2 = cr;
  spcf3 = cr;
  if (missiley == (downno+1)) { spcf1 = blankx[missilex]+"|"+cr; }
  if (missiley == (downno+3)) { spcf2 = blankx[missilex]+"|"+cr; }
  if (missiley == (downno+5)) { spcf3 = blankx[missilex]+"|"+cr; }
  lowerlf = "";
  for (var lowerspc = 0; lowerspc < (11-downno); lowerspc++) {
  if (missiley == (downno+7+lowerspc)) {
  lowerlf = lowerlf+blankx[missilex]+"|"+cr;
  } else { lowerlf = lowerlf+cr; }
  }
  myblank = blankx[mychrx];
  document.fmark.win.value = downlf+mestotal[1]+cr+spcf1
  +mestotal[2]+cr+spcf2+mestotal[3]+cr+spcf3+mestotal[4]
  +cr+lowerlf+myblank+""+cr+myblank+"(^_^)";
  timerID = setTimeout("interval1()",250);
  }
  }
  < /script>
  < center>
  < form method=post name=fmark>
  < table border=1 cellspacing=0 cellpadding=0>
  < tr><td align=center>
  < textarea name=win rows=20 cols=63 wrap=virtual></textarea>
  < pre><input type=button name=button value="<- " onClick="golmax()"> <input type=button name=button value="发射" onClick="fire()"> <input type=button name=button value=" ->" onClick="gormax()"></pre>
  < input type=button name=button value=" 新游戏 " onClick="restarter()">
  < /td>
  < /tr>
  < /table>
  < /form>
  < /center>
  < /body>

有帮助
(0)
0%
没帮助
(0)
0%