Import Java. io. *; import Java. io. bufferedreader; public class gobang {private string [] [] Board; Private Static int board_size = 15; Public void initboard () {board = new string [board_size] [board_size]; for (INT I = 0; I <board_size; I ++) {for (Int J = 0; j <board_size; j ++) {board [I] [J] = "+" ;}} public void printboard () {for (INT I = 0; I <board_size; I ++) {for (Int J = 0; j <board_size; j ++) {system. out. print (Board [I] [J]);} system. out. print ("\ n") ;}} public static void main (string [] ARGs) throws exception {gobang GB = new gobang (); GB. initboard (); GB. printboard (); bufferedreader BR = new bufferedreader (New inputstreamreader (system. in); string inputstr = NULL; while (inputstr = BR. readline ())! = NULL) {string [] posstrarr = inputstr. split (","); int xpos = integer. parseint (posstrarr [0]); int ypos = integer. parseint (posstrarr [1]); GB. board [yPos-1] [xPos-1] = "●";/* here should be the computer randomly generated two numbers, as the computer chess coordinates, to the Board array is different from the solid circle of the white pawns. Involved: 1. The validity of coordinates can only be numbers, not beyond the range of the board. 2. Point of the game, not repeated. 3. After each game, who needs to be scanned to win */GB. printboard ();/* and perform four rounds of scanning here to determine whether there are five chess moves in the horizontal, vertical, left oblique, and right oblique directions. */System. Out. println ("Enter the coordinates of your game. The coordinates should be in the format of X and Y :");}}}