• 大小: 0.02M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-02-01
  • 标签: 五子棋  

资源简介


资源截图

代码片段和文件信息

package gobang;
/**
 * chessboard
 */
public class Chessboard{
//Use 2D array as chessboard
    private String[][] board;
    //Checkerboard size
    public static final int BOARD_SIZE = 15;
    /**
     * Initialize chessboard
     */
    public void initChessboard(){
        board = new String[BOARD_SIZE][BOARD_SIZE];
        for (int i = 0; i < board.length; i++){
            for (int j = 0; j < board[i].length; j++){
                board[i][j] = “十“;
            }
        }
    }
    /**
     * Output chessboard
     */
    public void printBoard(){
        for (int i = 0; i < board.length; i++){
            for (int j = 0; j < board[i].length; j++){
                System.out.print(board[i][j]);
            }
            System.out.println();
        }

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2020-03-17 14:01  chessboardCUI\
     目录           0  2020-03-17 14:48  chessboardCUI\gobang\
     目录           0  2020-03-17 14:41  chessboardCUI\gobang\build\
     目录           0  2020-03-17 14:42  chessboardCUI\gobang\build\classes\
     文件           0  2020-03-17 14:46  chessboardCUI\gobang\build\classes\.netbeans_automatic_build
     文件           0  2020-03-17 14:46  chessboardCUI\gobang\build\classes\.netbeans_update_resources
     目录           0  2020-03-17 14:45  chessboardCUI\gobang\build\classes\gobang\
     文件        4872  2020-03-17 14:43  chessboardCUI\gobang\build\classes\gobang\ChessGobangGame.class
     文件         642  2020-03-17 14:43  chessboardCUI\gobang\build\classes\gobang\ChessStartGame.class
     文件        1225  2020-03-17 14:43  chessboardCUI\gobang\build\classes\gobang\Chessboard.class
     文件        1171  2020-03-17 14:43  chessboardCUI\gobang\build\classes\gobang\Chessman.class
     文件        3603  2020-03-17 14:49  chessboardCUI\gobang\build.xml
     文件          85  2020-03-17 14:50  chessboardCUI\gobang\manifest.mf
     目录           0  2020-03-17 14:22  chessboardCUI\gobang\nbproject\
     文件       79895  2020-03-17 15:02  chessboardCUI\gobang\nbproject\build-impl.xml
     文件         475  2020-03-17 14:38  chessboardCUI\gobang\nbproject\genfiles.properties
     目录           0  2020-03-17 14:22  chessboardCUI\gobang\nbproject\private\
     文件         112  2020-03-17 14:41  chessboardCUI\gobang\nbproject\private\private.properties
     文件         714  2020-03-17 14:39  chessboardCUI\gobang\nbproject\private\private.xml
     文件        2478  2020-03-17 15:07  chessboardCUI\gobang\nbproject\project.properties
     文件         514  2020-03-17 14:23  chessboardCUI\gobang\nbproject\project.xml
     文件         109  2020-03-17 15:27  chessboardCUI\gobang\save.txt
     目录           0  2020-03-17 14:02  chessboardCUI\gobang\src\
     目录           0  2020-03-17 14:45  chessboardCUI\gobang\src\gobang\
     文件       10197  2020-03-17 14:43  chessboardCUI\gobang\src\gobang\ChessGobangGame.java
     文件         262  2020-03-17 14:43  chessboardCUI\gobang\src\gobang\ChessStartGame.java
     文件        1245  2020-03-17 14:43  chessboardCUI\gobang\src\gobang\Chessboard.java
     文件         450  2020-03-17 14:43  chessboardCUI\gobang\src\gobang\Chessman.java
     目录           0  2020-03-17 15:17  chessboardCUI\gobang\test\

评论

共有 条评论