# Seeking embedded Wuziqi game program code, ARM. grateful!

#### Related Post

##### One thought on “Seeking embedded Wuziqi game program code, ARM. grateful!”

### Leave a Reply

You must be logged in to post a comment.

Skip to content# Seeking embedded Wuziqi game program code, ARM. grateful!

#### Related Post

##### One thought on “Seeking embedded Wuziqi game program code, ARM. grateful!”

### Leave a Reply

#### You missed

- Sun. Sep 25th, 2022

You must be logged in to post a comment.

.UTIL.ARRAYS; {=*; [email protected]; = o; = 16; = 5; // Chessboard [] [] board; () {} // Start the game () {board = newchar [max] [max] [max] ; // Fill the two -dimensional arrays '*' for (char [] ary: board) {Arrays.fill (Ary, BLANK);}} [] [] () {; intx, inty) {// @// Charblank =*; // System.out.println (x "," y ":" Board [y] [x] "," blank); if (board [y] [x] = = Blank) {// x, you must be empty in the position to add a chess piece Board [y] [x] = black; return;} ("already have a chess piece!");} (Intx, inty) {if) {if) {if) (Board [y] [x] == Blank) {// x, you must be empty in the position to add a chess piece. ;} // Chess:@/O (CHARCHESS, Intx, Inty) {// Find the y direction first. y-1] [x]! = Ches) {// If y is already the edge of the chessboard, or the previous one is not chess //, you will no longer continue to find break;} y-; top = y;} // Statistics the number of all Chess back to back, if it is count, you win intcount = 0; y = top; white (true) {if (y == max || board [y] [x]! = Chess) {/// /If you find your head or the next child, you will no longer continue to count the Break;} Count ; y ;} == Count;} // check:@/o (charchess, intx, inty) {// Find x first x The first direction is not BLANK's pawn Inttop = x; While (true) {if (x == 0 || Board [y] [x-1]! = Chess) {// If x is already the edge of the board, or or The previous one is not chess // and no longer continues to find Break;} x-; Top = x ;/ to count the number of all Chess back to back. ; While (true) {if (x == max || board [y] [x]! = Chess) {// If you find your head or the next child, you will no longer continue to count BRE ak;} Count ; x ;} == Count;} // Chess:@/O (Charches, intx, inty) {// first find MAX to the first chess piece that is not BLANK. While (true) {if (x == 0 || y == 0 || Board [y-1] [x-1]! = CHESS) {// Chess // will not continue to find Break;} x-; y-; top = y; left = x;} // to count the number of all Chess back, if it is count, you will win the IntCount = 0 0 ; x = left; y = top; space (true) {if (x == max || y == max || board [y] [x]! = CHESS) {// Chess will no longer continue to count the BREAK;} Count ; x ; y ;} == Count;} // Chess chess pieces:@/o (charchess, intx, inty) {// Find the x direction. Push inth = y; intleft = x; while (true) {if (x == max-1 || y == 0 || board [y-1] [x 1]! = Chess) {// If x It is already the edge of the chessboard, or the previous one is not chess //, and no longer continues to find break;} x ; y-; top = y; left = x ;/ It is count to win intcount = 0; x = left; y = top; space (true) {if (x == 0 || y == max || board [y] [x]! = Chess) {/// /If you find your head or the next child, you will no longer continue to count the break;} count ; x-; y ;} == Count;} (intx, inty) {// win in any direction, all of which Calculate (White, X, Y) || Winonx (White, X, Y) || Winonxy (White, X, Y) || Winonyx (white, x, y);} (intx, inty) {(black, x, y) || Winonx (Black, X, Y) || Winonxy (Black, X, Y) || Winonyx (black, x, y);}}