⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 chesspoint.java

📁 本文件包中包含了15个java课程设计。对java学习是很不错的。
💻 JAVA
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package 中国象棋打谱系统;/** * * @author Administrator */public class ChessPoint{   int x,y;   boolean 有棋子;   ChessPiece piece=null;   ChessBoard board=null;   public ChessPoint(int x,int y,boolean boo)   {      this.x=x;      this.y=y;      有棋子=boo;   }  public boolean isPiece()  {    return 有棋子;  }  public void set有棋子(boolean boo)  {    有棋子=boo;  }   public int getX()  {    return x;  }  public int getY()  {    return y;  }  public void setPiece(ChessPiece piece,ChessBoard board)  {     this.board=board;     this.piece=piece;     board.add(piece);     int w=(board.unitWidth);     int h=(board.unitHeight);     piece.setBounds(x-w/2,y-h/2,w,h);     有棋子=true;     board.validate();   }  public ChessPiece getPiece()  {     return piece;  }  public void reMovePiece(ChessPiece piece,ChessBoard board)  {     this.board=board;     this.piece=piece;     board.remove(piece);     board.validate();     有棋子=false;  }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -