0
我想提出一個五子棋遊戲,我有使用二維數組,像這樣的板設置:我想搬到一個兩個維數組內的項目在Java中
stoneCounts[0][0]=stoneCounts[0][1]=stoneCounts[0][2]=stoneCounts[0][3]=stoneCounts[0][4] = W;
stoneCounts[11][0]=stoneCounts[11][1] = W;
stoneCounts[16][0]=stoneCounts[16][1]=stoneCounts[16][2]= W;
stoneCounts[18][0]=stoneCounts[18][1]=stoneCounts[18][2]=stoneCounts[18][3]=stoneCounts[18][4]=W;
stoneCounts[23][0]=stoneCounts[23][1]=stoneCounts[23][2]=stoneCounts[23][3]=stoneCounts[23][4] =B;
stoneCounts[12][0]=stoneCounts[12][1] = B;
stoneCounts[7][0]=stoneCounts[7][1]=stoneCounts[7][2]=stoneCounts[7][3]=stoneCounts[7][4] =B;
stoneCounts[5][0]=stoneCounts[5][1]=stoneCounts[5][2]= B;
當玩家走棋,怎麼能我得到了,例如。 'W'在stoneCounts [0] [1]移動到stoneCounts [2] [3]
Java?還有別的嗎? – Thilo
在java中,對不起。 –
stoneCounts [2] [3] = stoneCounts [0] [1]? – igon