JChess:一个简单的 Java 国际象棋游戏

上传者: 42168902 | 上传时间: 2022-10-26 18:30:11 | 文件大小: 82KB | 文件类型: ZIP
国际象棋 我所做的只是想看看我是否可以提出一个有效的算法来验证国际象棋移动并检测检查和将死(我不是国际象棋人,所以我自己很难发现这些东西)。 它没有人工智能或任何东西,人们玩起来也很不舒服,因为你必须来回传递鼠标。 它使用 Java 的 Swing 库作为可视化组件,可能违反了大多数代码质量指南和 OOP 原则,因为我最近才开始学习这些。 从好的方面来说,我认为评论很好地解释了正在发生的事情。 从我的测试来看,它应该能够正确地执行所有标准动作,包括过路捕获、城堡和典当对皇后的提升。 如果你尝试做一些游戏认为你不应该做的事情,它会在控制台上抛出一个有用的(我希望)错误消息。 它还会在有人检查、将死或是否存在僵局时通知您 - 尽管最后两个也会结束游戏并为您提供图形消息。 游戏从 Linux 上的 JChess.sh 和 Windows 上的 JChess.cmd 的 shell 脚本启动

文件下载

资源详情

[{"title":"( 45 个子文件 82KB ) JChess:一个简单的 Java 国际象棋游戏","children":[{"title":"JChess-master","children":[{"title":"src","children":[{"title":"jChess","children":[{"title":"Knight.java <span style='color:#111;'> 1.13KB </span>","children":null,"spread":false},{"title":"Square.java <span style='color:#111;'> 1.69KB </span>","children":null,"spread":false},{"title":"Pawn.java <span style='color:#111;'> 2.27KB </span>","children":null,"spread":false},{"title":"GlassPane.java <span style='color:#111;'> 1.58KB </span>","children":null,"spread":false},{"title":"Bishop.java <span style='color:#111;'> 590B </span>","children":null,"spread":false},{"title":"Piece.java <span style='color:#111;'> 1.26KB </span>","children":null,"spread":false},{"title":"Rook.java <span style='color:#111;'> 576B </span>","children":null,"spread":false},{"title":"Board.java <span style='color:#111;'> 19.14KB </span>","children":null,"spread":false},{"title":"Main.java <span style='color:#111;'> 2.06KB </span>","children":null,"spread":false},{"title":"BoardListener.java <span style='color:#111;'> 1.67KB </span>","children":null,"spread":false},{"title":"Queen.java <span style='color:#111;'> 753B </span>","children":null,"spread":false},{"title":"King.java <span style='color:#111;'> 1.31KB </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"images","children":[{"title":"white_wins.png <span style='color:#111;'> 13.40KB </span>","children":null,"spread":false},{"title":"Rook_w.png <span style='color:#111;'> 480B </span>","children":null,"spread":false},{"title":"King_w.png <span style='color:#111;'> 1.86KB </span>","children":null,"spread":false},{"title":"Queen_w.png <span style='color:#111;'> 2.99KB </span>","children":null,"spread":false},{"title":"Knight_b.png <span style='color:#111;'> 1.50KB </span>","children":null,"spread":false},{"title":"Knight_w.png <span style='color:#111;'> 1.75KB </span>","children":null,"spread":false},{"title":"Rook_b.png <span style='color:#111;'> 405B </span>","children":null,"spread":false},{"title":"King_b.png <span style='color:#111;'> 1.78KB </span>","children":null,"spread":false},{"title":"Bishop_b.png <span style='color:#111;'> 1.56KB </span>","children":null,"spread":false},{"title":"draw.png <span style='color:#111;'> 8.25KB </span>","children":null,"spread":false},{"title":"Pawn_b.png <span style='color:#111;'> 471B </span>","children":null,"spread":false},{"title":"Pawn_w.png <span style='color:#111;'> 1.13KB </span>","children":null,"spread":false},{"title":"black_wins.png <span style='color:#111;'> 16.83KB </span>","children":null,"spread":false},{"title":"Bishop_w.png <span style='color:#111;'> 2.04KB </span>","children":null,"spread":false},{"title":"Queen_b.png <span style='color:#111;'> 2.25KB </span>","children":null,"spread":false},{"title":"svg","children":[{"title":"Chess_pdt45.svg <span style='color:#111;'> 816B </span>","children":null,"spread":false},{"title":"Chess_rlt45.svg <span style='color:#111;'> 1.12KB </span>","children":null,"spread":false},{"title":"Chess_klt45.svg <span style='color:#111;'> 1.41KB </span>","children":null,"spread":false},{"title":"Chess_kdt45.svg <span style='color:#111;'> 1.53KB </span>","children":null,"spread":false},{"title":"Chess_qdt45.svg <span style='color:#111;'> 1.74KB </span>","children":null,"spread":false},{"title":"Chess_nlt45.svg <span style='color:#111;'> 1.25KB </span>","children":null,"spread":false},{"title":"Chess_plt45.svg <span style='color:#111;'> 816B </span>","children":null,"spread":false},{"title":"Chess_ndt45.svg <span style='color:#111;'> 1.53KB </span>","children":null,"spread":false},{"title":"Chess_qlt45.svg <span style='color:#111;'> 1.62KB </span>","children":null,"spread":false},{"title":"Chess_rdt45.svg <span style='color:#111;'> 1.75KB </span>","children":null,"spread":false},{"title":"Chess_bdt45.svg <span style='color:#111;'> 1.26KB </span>","children":null,"spread":false},{"title":"Chess_blt45.svg <span style='color:#111;'> 1.25KB </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"jChess.sh <span style='color:#111;'> 38B </span>","children":null,"spread":false},{"title":"LICENSE <span style='color:#111;'> 1.18KB </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 1.11KB </span>","children":null,"spread":false},{"title":"jChess.cmd <span style='color:#111;'> 25B </span>","children":null,"spread":false},{"title":".gitignore <span style='color:#111;'> 22B </span>","children":null,"spread":false},{"title":"bin","children":[{"title":".gitignore <span style='color:#111;'> 211B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明