文件名称:ins123
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:337.88kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
基于GUI的Java五子棋游戏源码,可人机对战,用java swing做的,运行时
需要修改图片的路径。
制作思路:
用按钮做棋子,用图片填充每个按钮。
设置棋盘为24*24的,五子棋FiveChessGame类,继承了JFrame,并且
添加了时间监听,五子棋的棋子chess,用JButton表示,五子棋棋子chess
对应的棋子标识,用于标记棋子的状态。 1表示黑棋,-1表示白棋,默认0表
示无棋子,点击棋子时设置棋子的图标setOnChessIcon。 根据判断该位置
的棋子是否有棋子,和棋子颜色设置棋子图标
测试棋子的方法showChess。用于将chessInt数组内容打印到控制台,
以便观看。-GUI-based Java backgammon game source code, can be man-machine gaming, to do with java swing, run-time
Need to modify the image path.
Making ideas:
Using the button as a pawn to fill with pictures for each button.
Set the board to 24* 24, renju FiveChessGame class inherits JFrame, and
Add the time monitoring the game of the chess pieces chess, with a JButton that the game of chess pieces
Corresponding piece logo, used to mark pieces of state. 1 is Black, said the white side is-1, the default 0 table
Showed no pawn, click the icon pieces when set pieces setOnChessIcon. According to determine the location
The piece is a piece, and pieces color set piece icon
Test piece approach showChess. Array of content for the chessInt print to the console,
To watch.
需要修改图片的路径。
制作思路:
用按钮做棋子,用图片填充每个按钮。
设置棋盘为24*24的,五子棋FiveChessGame类,继承了JFrame,并且
添加了时间监听,五子棋的棋子chess,用JButton表示,五子棋棋子chess
对应的棋子标识,用于标记棋子的状态。 1表示黑棋,-1表示白棋,默认0表
示无棋子,点击棋子时设置棋子的图标setOnChessIcon。 根据判断该位置
的棋子是否有棋子,和棋子颜色设置棋子图标
测试棋子的方法showChess。用于将chessInt数组内容打印到控制台,
以便观看。-GUI-based Java backgammon game source code, can be man-machine gaming, to do with java swing, run-time
Need to modify the image path.
Making ideas:
Using the button as a pawn to fill with pictures for each button.
Set the board to 24* 24, renju FiveChessGame class inherits JFrame, and
Add the time monitoring the game of the chess pieces chess, with a JButton that the game of chess pieces
Corresponding piece logo, used to mark pieces of state. 1 is Black, said the white side is-1, the default 0 table
Showed no pawn, click the icon pieces when set pieces setOnChessIcon. According to determine the location
The piece is a piece, and pieces color set piece icon
Test piece approach showChess. Array of content for the chessInt print to the console,
To watch.
相关搜索: GUI JBUTTON GAME
java
(系统自动生成,下载前可以参看下载内容)
下载文件列表
ins123.exe
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.