import java.awt.*; public class DrawingDecks implements IDecksDrawing{ private NumberOfDecks numDecks; public NumberOfDecks getProperty(){ return numDecks; } public void setNumDecks(int nDecks){ switch(nDecks){ case 1: numDecks = NumberOfDecks.Deck_1; break; case 2: numDecks = NumberOfDecks.Deck_2; break; case 3: numDecks = NumberOfDecks.Deck_3; break; default: numDecks = NumberOfDecks.Deck_1; System.out.println("Что-то пошло не так, количество палуб неверное" + Integer.toString(nDecks) + "сделаем вид, будто она одна"); break; } } public void DrawDeck(int _startPosX, int _startPosY,Color bodyColor, Graphics2D g){ if(numDecks == NumberOfDecks.Deck_1){ } if(numDecks == NumberOfDecks.Deck_2){ g.setPaint(Color.BLACK); g.drawLine(_startPosX + 120, _startPosY + 75, _startPosX+ 55, _startPosY + 75); } if(numDecks == NumberOfDecks.Deck_3){ g.setPaint(Color.BLACK); g.drawLine(_startPosX + 120, _startPosY + 75, _startPosX+ 55, _startPosY + 75); g.drawLine(_startPosX + 125, _startPosY + 70, _startPosX+ 50, _startPosY + 70); } } }