登录
首页 » 其他 » Java人机对战五子棋游戏

Java人机对战五子棋游戏

于 2022-08-08 发布 文件大小:38.43 kB
0 192
下载积分: 2 下载次数: 1

代码说明:

Java人机对战五子棋游戏FiveChessGame设计思路:   1、用按钮做棋子,用图片填充每个按钮。   2、棋盘为24*24的   FiveChessGame类的构造方法。主要设置JFrame的相关属性、棋盘初始化方法initChess(JButton[][] chess),设置棋子的相关属性,图标、大孝事件等。点击棋子时设置棋子的图标setOnChessIcon,根据判断该位置的棋子是否有棋子,和棋子颜色设置棋子图标,将棋子放入panel中addChessIntoPanel(JButton[][] buttons,JPanel panel),把panel设置为网格布局,然后向里面添加棋子JButton:chess。   响应按钮的事件actionPerformed(ActionEvent e)根据点击的按钮,获取其ActionCommand,然后找到对应的棋子chess[x][y],并作出相应的响应事件。判断棋子是否嬴了,并给出相应的操作。嬴了调用getWinDialog()弹出提示栏。

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • % 该Matlab程序基于牛顿-拉夫逊算法,用于计算已知导纳矩阵、PQ节点、PV节点、平衡节点(UA)的电力网络潮流 % U...
    % 该Matlab程序基于牛顿-拉夫逊算法,用于计算已知导纳矩阵、PQ节点、PV节点、平衡节点(UA)的电力网络潮流 % U - 各节点母线电压 S - 各节点注入功率 S_net - 电力网络总损耗 % PQ_P - 实算PQ节点注入有功功率 PQ_Q - 实算PQ节点注入无功功率 % delt_PQ_P - 实算PQ节点有功功率修正值 delt_PQ_Q -实算PQ节点无功功率修正值 % delt_UA_P - 实平衡节点有功功率修正值 delt_U_2 - 实平衡节点电压平方修正值 % delt_PQV - 实算P Q U^2修正值 J - 雅可比矩阵 % e - 电压实部 f - 电压虚部 delt_ef - 电压实部与虚部修正值- The Matlab program based on the Newton- Raphson algorithm is used to calculate the admittance matrix is known, PQ node, PV node, the node balance (UA) the trend of the electricity networks U- the node bus voltage S- each node injection power S_net-- The total loss of electric power networks PQ_P- operator PQ is injected into active nodes PQ_Q- operator PQ is injected reactive power node delt_PQ_P- is considered the correct value of active power PQ node delt_PQ_Q- really count PQ node reactive power to amend the value of delt_UA_P- real active power balance of the correct value of the node delt_U_2- node voltage balance is the correct value of the square o
    2022-10-25 02:45:02下载
    积分:1
  • 这个程序包的主要功能是对多台5101b进行功能化测试,并进行数据采集,自动生成测试证书。...
    这个程序包的主要功能是对多台5101b进行功能化测试,并进行数据采集,自动生成测试证书。-The main function of the package is more than 5101b functional test and data acquisition, automatic generation of test certificate.
    2023-01-11 21:10:03下载
    积分:1
  • a sudoku game, user can type the row, colume, and the number to play, an assingn...
    a sudoku game, user can type the row, colume, and the number to play, an assingnment in cla-a sudoku game, user can type the row, colume, and the number to play, an assingnment in class
    2022-03-16 14:09:52下载
    积分:1
  • many functions of the program can also put the whole mess. Lindsborg about in th...
    程序功能很多,还可以摆残局。棋力大约在中间水平,只比棋隐、雷霆等软件差些。 被改写了部分代码,速度比原程序约快2倍,不过有时候搜索的点反而多,本想再加入简单开局库,可没时间且要改的内容很多。由于作者设计的数据结构、估值函数的缺陷,程序中残局问题很多,比如单兵、单马电脑不知道如何赢孤将!! -many functions of the program can also put the whole mess. Lindsborg about in the middle level, a game than implicit, Thunder software badly. Some were rewritten code, faster than the original procedure about two times faster, but sometimes the search point, more than the simple wish to join the first basement, which could not be changed to a great many. As the author of the data structure design, valuation function defects, procedures mess many problems, such as one-man, Mr Ma computers do not know how to win alone! !
    2022-03-15 00:22:22下载
    积分:1
  • 垂直风格带下拉滚动条的Flash图文菜单
    垂直风格带下拉滚动条的Flash图文菜单,那个小圆点可以拖动,拖动后图片列表即向上滚动。
    2022-01-28 03:27:18下载
    积分:1
  • 《C++程序设计教程》作者石志国—源代码
    《C++程序设计教程》作者石志国—源代码,1-15章全部源代码,适合初学者分析借鉴学习。
    2022-03-25 00:14:59下载
    积分:1
  • SRL. SCAR的基本资源库!!!没有的人可下载
    SRL. SCAR的基本资源库!!!没有的人可下载-SRL. SCAR of the basic resources! ! ! No person may download!
    2022-12-25 01:45:03下载
    积分:1
  • WTL字体类示范代码
    WTL字体类示范代码-WTL font type model code
    2022-01-26 04:18:40下载
    积分:1
  • Flash小球特效 跟随鼠标旋转
    Flash小球特效 跟随鼠标旋转,可把本效果应用于flash Loading剪辑中,鼠标移动的超快,小球旋转的越快,整体上是随着鼠标移动的,可以看作是鼠标跟随特效吧。
    2022-08-10 18:55:24下载
    积分:1
  • 录音带 磁带样式的HTML5音乐播放器特效
    录音带 磁带样式的HTML5音乐播放器特效,整个播放器像一个磁带,开始播放音乐的时候,磁带开始转动了,还可对音乐进行简单的播放控制。里面的音乐文件因压缩包太大,删除了一些,不影响播放器运行,只是有些音乐会无法播放。
    2022-10-13 06:50:04下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载