文件名称:five-chess

  • 所属分类:
  • 游戏
  • 资源属性:
  • 上传时间:
  • 2014-10-20
  • 文件大小:
  • 12kb
  • 下载次数:
  • 0次
  • 提 供 者:
  • 冰***
  • 相关连接:
  • 下载说明:
  • 别用迅雷下载,失败请重下,重下不扣分!
下载
别用迅雷、360浏览器下载。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。

介绍说明--下载内容均来自于网络,请自行研究使用

(1)首先调用Chessboard 类型的chessboard 属性中的initBoard()与printBoard()方法去初始

化与打印棋盘。

 (2)从控制台获取用户的输入。

 (3)再调用本类的isValid()方法去验证玩家输入的合法性,如果输入不合法,返回第2 步继续,

否则到第4 步。

 (4)把玩家下的棋子位置赋值为 ● 。

 (5)调用isWon( int posX , int posY , String chessman )判断玩家是否赢了。如果玩家赢了,

则调用isReply()方法输出的信息询问玩家是否重新游戏,如果玩家输入y,则返回第1 步重新

开始。

 (6)调用computerDo()方法随机生成计算机的x,y 坐标,并把board[x][y] 赋值为 ○ 。如果

计算机赢了,则调用isReply()方法输出的信息询问玩家是否重新游戏,如果玩家输入y,则返

回第1 步重新开始,否则返回第2 步轮到用户输入。-(1) The first call Chessboard type chessboard properties initBoard () and printBoard () method to initialize and print the board.  (2) to obtain user input the console.  (3) and then call this class isValid () method to verify the legitimacy of player input, if the input is not valid, return to step 2 to continue, otherwise to step 4.  (4) under the pawn position players assigned to " ●" .  (5) calls isWon (int posX, int posY, String chessman) to determine whether the player wins. If the player wins, then call isReply () method outputs information to re-ask the players if the game, if a player enter y, then return to step 1 and start again.  (6) calling computerDo () method of a computer generated random x, y coordinates, and the board [x] [y] is assigned " ○" . If the computer wins, then call isReply () method outputs information to re-ask the players if the game, if a player enter y, then return to step 1 to start again, otherw
(系统自动生成,下载前可以参看下载内容)

下载文件列表





five chess.docx

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度更多...
  • 请直接用浏览器下载本站内容,不要使用迅雷之类的下载软件,用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*主  题:
*内  容:
*验 证 码:

源码中国 www.ymcn.org