通过一个二维数组简单的实现一个棋盘

public class Demo8 {
    public static void main(String[] args) {
        //输出一个棋盘 创建一个二维数组  0:代表没有棋子  1:代表白棋  2:代表黑棋
        int[][] array = new int[11][11];
        System.out.println("中国围棋");
        array[1][3] = 1;
        array[3][6] = 2;
        for (int[] a : array){
            for (int b:a) {
                System.out.print(b+"	");
            }
            System.out.println();
        }
    }
}

原文地址:https://www.cnblogs.com/xie-qi/p/14054816.html