|
java网络五子棋的源代码(27) { getLocation(chessPoint_a,chessPoint_b,color); isWin=checkWin(chessPoint_a,chessPoint_b,color); if(isWin==false) { chessthread.sendMessage("/"+chessPeerName+" /chess "+chessPoint_a+" "+chessPoint_b+" "+color); this.add(chesspoint_white); chesspoint_white.setBounds(chessPoint_a*20-7,chessPoint_b*20-7,16,16); statusText.setText("白(第"+chessWhiteCount+"步)"+chessPoint_a+" "+chessPoint_b+",请黑棋下子"); isMouseEnabled=false; } else { chessthread.sendMessage("/"+chessPeerName+" /chess "+chessPoint_a+" "+chessPoint_b+" "+color); this.add(chesspoint_white); chesspoint_white.setBounds(chessPoint_a*20-7,chessPoint_b*20-7,16,16); chessVictory(-1); isMouseEnabled=false; } } } public void netChessPaint(int chessPoint_a,int chessPoint_b,int color) { chessPoint_black chesspoint_black=new chessPoint_black(this); chessPoint_white chesspoint_white=new chessPoint_white(this); getLocation(chessPoint_a,chessPoint_b,color); if(color==1) { isWin=checkWin(chessPoint_a,chessPoint_b,color); if(isWin==false) {
this.add(chesspoint_black); chesspoint_black.setBounds(chessPoint_a*20-7,chessPoint_b*20-7,16,16);
|