?? card.java
字號:
//Card類申明
package spider.araneid;
import java.awt.*;
public class Card {
private Pools pool;
private Image front;
private Image rear;
private Image current;
private String code;
public Card(String code) {
this.code = code;
Toolkit tk = Toolkit.getDefaultToolkit();
this.front = tk.getImage("images/"+code+".gif");
this.rear = tk.getImage("images/rear.gif");
this.turn2rear();
}
public void turn() {
if (this.current==this.front)
this.current=this.rear;
else
this.current=this.front;
}
public void turn2rear() {
this.current=this.rear;
}
public void turn2front() {
this.current=this.front;
}
public Image getCurrent() {
return this.current;
}
public Image getFront() {
return this.front;
}
public Image getRear() {
return this.rear;
}
public String getCode() {
return this.code;
}
public void setPool(Pools pool) {
this.pool=pool;
}
public Pools getPool() {
return this.pool;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -