import java.awt.*; public class DrawDeck implements IDrawningDeck { private Deck deckCount; @Override public void SetDeckCount(int count){ deckCount = Deck.GetDeck(count); } @Override public void DrawningDeck(float _startPosX, float _startPosY, int _warmlyShipWidth, Graphics2D g2d, Color bodyColor){ int count = 1; switch (deckCount) { case One: break; case Two: count = 2; break; case Three: count = 3; break; } for (int i = 1; i < count; ++i){ g2d.setColor(bodyColor); g2d.fillRect((int)(_startPosX + _warmlyShipWidth / 5), (int)_startPosY - 20 * i, _warmlyShipWidth * 3 / 5, 20); g2d.setColor(Color.BLACK); g2d.drawRect((int)(_startPosX + _warmlyShipWidth / 5), (int)_startPosY - 20 * i, _warmlyShipWidth * 3 / 5, 20); } } }