简单的五子棋jav游戏代码.docVIP

  • 34
  • 0
  • 约1.73万字
  • 约 7页
  • 2016-08-26 发布于贵州
  • 举报
简单的五子棋jav游戏代码

package day17.gobang; import java.util.Arrays; public class GoBangGame { public static final char BLANK=*; public static final char BLACK=@; public static final char WHITE=O; public static final int MAX = 16; private static final int COUNT = 5; //棋盘 private char[][] board; public GoBangGame() { } //开始游戏 public void start() { board = new char[MAX][MAX]; //把二维数组都填充‘*’ for(char[] ary: board){ Arrays.fill(ary, BLANK); } } public char[][] getChessBoard(){ return board; } public void addBlack(int x, int y) throws ChessExistExcept

文档评论(0)

1亿VIP精品文档

相关文档