You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
837 B
38 lines
837 B
package solitaer;
|
|
|
|
import java.awt.Color;
|
|
import java.awt.Graphics;
|
|
|
|
public class SaveStack extends BaseStack {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
public SaveStack(int _x, int _y) {
|
|
// TODO Auto-generated constructor stub
|
|
super(true);
|
|
super.setLocation(_x, _y);
|
|
super.setSize(IMAGE_WIDTH, STACK_HIGHT);
|
|
super.setOpaque(false);
|
|
super.setLayout(null);
|
|
}
|
|
|
|
@Override
|
|
protected boolean cardCheck(Card _topStack, Card _playerCard) {
|
|
// TODO Auto-generated method stub
|
|
return false;
|
|
}
|
|
|
|
@Override
|
|
protected void paintComponent(Graphics g) {
|
|
// TODO Auto-generated method stub
|
|
super.paintComponent(g);
|
|
if (stackIsEmpty()) {
|
|
g.setColor(Color.pink);
|
|
g.fillRect(0, 0, this.getWidth(), IMAGE_HIGHT);
|
|
|
|
g.setColor(Color.black);
|
|
g.drawRect(0, 0, this.getWidth() - 1, IMAGE_HIGHT - 1);
|
|
}
|
|
}
|
|
|
|
}
|