文件名称:FiveChessGame
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:37.79kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
基于GUI的Java五子棋游戏源码,可人机对战,用java swing做的,运行时需要修改图片的路径。
制作思路:
用按钮做棋子,用图片填充每个按钮。
设置棋盘为24*24的,五子棋FiveChessGame类,继承了JFrame,并且添加了时间监听,五子棋的棋子chess,用JButton表示,五子棋棋子chess对应的棋子标识,用于标记棋子的状态。 1表示黑棋,-1表示白棋,默认0表示无棋子,点击棋子时设置棋子的图标setOnChessIcon。 根据判断该位置的棋子是否有棋子,和棋子颜色设置棋子图标
测试棋子的方法showChess。用于将chessInt数组内容打印到控制台,以便观看。-Gui-based Java renju game source, can the man-machine against, with Java swing do, to run modified picture path.
Make ideas:
Use the buttons do, with the picture fills every button.
Set for 24* 24 of the board, FiveChessGame renju class, inherited JFrame, and adding time monitored, a piece of the chess federation, with JButton said, chess pieces a piece of the corresponding renju logo, used to mark the state of the pieces. 1 says black,-1 says white, the default 0 means without the piece, click on the icon of the set when the pieces setOnChessIcon. According to judge the position if there is a piece of the pieces, and the stones color set pieces icon
Test pieces showChess method. Used for chessInt array content print to console, to watch.
制作思路:
用按钮做棋子,用图片填充每个按钮。
设置棋盘为24*24的,五子棋FiveChessGame类,继承了JFrame,并且添加了时间监听,五子棋的棋子chess,用JButton表示,五子棋棋子chess对应的棋子标识,用于标记棋子的状态。 1表示黑棋,-1表示白棋,默认0表示无棋子,点击棋子时设置棋子的图标setOnChessIcon。 根据判断该位置的棋子是否有棋子,和棋子颜色设置棋子图标
测试棋子的方法showChess。用于将chessInt数组内容打印到控制台,以便观看。-Gui-based Java renju game source, can the man-machine against, with Java swing do, to run modified picture path.
Make ideas:
Use the buttons do, with the picture fills every button.
Set for 24* 24 of the board, FiveChessGame renju class, inherited JFrame, and adding time monitored, a piece of the chess federation, with JButton said, chess pieces a piece of the corresponding renju logo, used to mark the state of the pieces. 1 says black,-1 says white, the default 0 means without the piece, click on the icon of the set when the pieces setOnChessIcon. According to judge the position if there is a piece of the pieces, and the stones color set pieces icon
Test pieces showChess method. Used for chessInt array content print to console, to watch.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
FiveChessGame/AboutDialog.java
FiveChessGame/FiveChessGameMain.java
FiveChessGame/FiveChessIcons/bz.jpg
FiveChessGame/FiveChessIcons/down.jpg
FiveChessGame/FiveChessIcons/downBlack.jpg
FiveChessGame/FiveChessIcons/downLeft.jpg
FiveChessGame/FiveChessIcons/downLeftBlack.jpg
FiveChessGame/FiveChessIcons/downLeftWhite.jpg
FiveChessGame/FiveChessIcons/downRight.jpg
FiveChessGame/FiveChessIcons/downRightBlack.jpg
FiveChessGame/FiveChessIcons/downRightWhite.jpg
FiveChessGame/FiveChessIcons/downWhite.jpg
FiveChessGame/FiveChessIcons/hz.jpg
FiveChessGame/FiveChessIcons/left.jpg
FiveChessGame/FiveChessIcons/leftBlack.jpg
FiveChessGame/FiveChessIcons/leftWhite.jpg
FiveChessGame/FiveChessIcons/qz.jpg
FiveChessGame/FiveChessIcons/right.jpg
FiveChessGame/FiveChessIcons/rightBlack.jpg
FiveChessGame/FiveChessIcons/rightWhite.jpg
FiveChessGame/FiveChessIcons/Thumbs.db
FiveChessGame/FiveChessIcons/up.jpg
FiveChessGame/FiveChessIcons/upBlack.jpg
FiveChessGame/FiveChessIcons/upLeft.jpg
FiveChessGame/FiveChessIcons/upLeftBlack.jpg
FiveChessGame/FiveChessIcons/upLeftWhite.jpg
FiveChessGame/FiveChessIcons/upRight.jpg
FiveChessGame/FiveChessIcons/upRightBlack.jpg
FiveChessGame/FiveChessIcons/upRightWhite.jpg
FiveChessGame/FiveChessIcons/upWhite.jpg
FiveChessGame/WinDialog.java
FiveChessGame/FiveChessIcons
FiveChessGame
FiveChessGame/FiveChessGameMain.java
FiveChessGame/FiveChessIcons/bz.jpg
FiveChessGame/FiveChessIcons/down.jpg
FiveChessGame/FiveChessIcons/downBlack.jpg
FiveChessGame/FiveChessIcons/downLeft.jpg
FiveChessGame/FiveChessIcons/downLeftBlack.jpg
FiveChessGame/FiveChessIcons/downLeftWhite.jpg
FiveChessGame/FiveChessIcons/downRight.jpg
FiveChessGame/FiveChessIcons/downRightBlack.jpg
FiveChessGame/FiveChessIcons/downRightWhite.jpg
FiveChessGame/FiveChessIcons/downWhite.jpg
FiveChessGame/FiveChessIcons/hz.jpg
FiveChessGame/FiveChessIcons/left.jpg
FiveChessGame/FiveChessIcons/leftBlack.jpg
FiveChessGame/FiveChessIcons/leftWhite.jpg
FiveChessGame/FiveChessIcons/qz.jpg
FiveChessGame/FiveChessIcons/right.jpg
FiveChessGame/FiveChessIcons/rightBlack.jpg
FiveChessGame/FiveChessIcons/rightWhite.jpg
FiveChessGame/FiveChessIcons/Thumbs.db
FiveChessGame/FiveChessIcons/up.jpg
FiveChessGame/FiveChessIcons/upBlack.jpg
FiveChessGame/FiveChessIcons/upLeft.jpg
FiveChessGame/FiveChessIcons/upLeftBlack.jpg
FiveChessGame/FiveChessIcons/upLeftWhite.jpg
FiveChessGame/FiveChessIcons/upRight.jpg
FiveChessGame/FiveChessIcons/upRightBlack.jpg
FiveChessGame/FiveChessIcons/upRightWhite.jpg
FiveChessGame/FiveChessIcons/upWhite.jpg
FiveChessGame/WinDialog.java
FiveChessGame/FiveChessIcons
FiveChessGame
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.