?? pieces.java
字號:
/*
* 創建日期 2005-4-10
*
* TODO 要更改此生成的文件的模板,請轉至
* 窗口 - 首選項 - Java - 代碼樣式 - 代碼模板
*/
package frame;
import java.awt.Image;
/**
* @author Robert
*
* TODO 要更改此生成的類型注釋的模板,請轉至
* 窗口 - 首選項 - Java - 代碼樣式 - 代碼模板
*/
public class Pieces {
private Image piece;
private int pColor,typeNo,score;
private int[][] grid;
private int[][] bak;
private boolean onBoard = false;
private boolean selected = false;
private boolean inUse = true;
public Pieces(Image piece,int typeNo,int pColor, int score,int[][] grid){
this.piece = piece;
this.pColor = pColor;
this.typeNo = typeNo;
this.score = score;
this.grid = grid;
this.bak = new int[score][score];
for(int i = 0; i < score; i ++)
for(int j = 0; j < score; j ++)
bak[i][j] = grid[i][j];
}
public int getScore(){
return score;
}
public Image getPiece(){
return piece;
}
public int getpColor(){
return pColor;
}
public int getTypeNo(){
return typeNo;
}
public boolean getOnBoard(){
return onBoard;
}
public void setOnBoard(boolean onBoard){
this.onBoard = onBoard;
}
public void setPSelected(boolean selected){
this.selected = selected;
}
public boolean getPSelected(){
return selected;
}
public int[][] getGrid(){
return grid;
}
public void setGrid(int[][] grid){
this.grid = grid;
}
public int[][] getBak(){
return bak;
}
public boolean getInUse(){
return inUse;
}
public void setInUse(boolean inUse){
this.inUse = inUse;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -