43 lines
1.1 KiB
Java
43 lines
1.1 KiB
Java
import java.awt.*;
|
|
|
|
public class DrawningDeck {
|
|
private CountDeck _deck;
|
|
|
|
public CountDeck getCount() {
|
|
return _deck;
|
|
}
|
|
|
|
public void SetCount(int count) {
|
|
switch (count) {
|
|
case 1:
|
|
_deck = CountDeck.One;
|
|
break;
|
|
case 2:
|
|
_deck = CountDeck.Two;
|
|
break;
|
|
default:
|
|
_deck = CountDeck.Three;
|
|
break;
|
|
}
|
|
}
|
|
|
|
public void Draw(Graphics2D g, int _StartPosX, int _StartPosY) {
|
|
if (_deck == null) {
|
|
return;
|
|
}
|
|
|
|
if (_deck == CountDeck.One) {
|
|
g.fillRect(_StartPosX + 50, _StartPosY + 70, 100, 10);
|
|
}
|
|
if (_deck == CountDeck.Two) {
|
|
g.fillRect(_StartPosX + 50, _StartPosY + 70, 100, 10);
|
|
g.fillRect(_StartPosX + 60, _StartPosY + 60, 80, 15);
|
|
}
|
|
if (_deck == CountDeck.Three) {
|
|
g.fillRect(_StartPosX + 50, _StartPosY + 70, 100, 10);
|
|
g.fillRect(_StartPosX + 60, _StartPosY + 60, 80, 15);
|
|
g.fillRect(_StartPosX + 70, _StartPosY + 50, 60, 15);
|
|
}
|
|
}
|
|
}
|