(Graphics g)
| 40 | } |
| 41 | |
| 42 | public void paintComponent(Graphics g) |
| 43 | { |
| 44 | Player currentPlayer = graphwar.getGameData().getCurrentTurnPlayer(); |
| 45 | double angle; |
| 46 | |
| 47 | if(graphwar.getGameData().isAngleDown() || graphwar.getGameData().isAngleUp()) |
| 48 | { |
| 49 | angle = graphwar.getGameData().getAngle(); |
| 50 | |
| 51 | this.repaint(); |
| 52 | } |
| 53 | else |
| 54 | { |
| 55 | |
| 56 | angle = currentPlayer.getCurrentTurnSoldier().getAngle(); |
| 57 | } |
| 58 | |
| 59 | Graphics2D g2d = (Graphics2D)g; |
| 60 | g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON); |
| 61 | g2d.setColor(currentPlayer.getColor()); |
| 62 | paintCircle(g2d, angle); |
| 63 | paintAngleText(g2d, angle); |
| 64 | } |
| 65 | |
| 66 | private void paintCircle(Graphics g, double angle) |
| 67 | { |
nothing calls this directly
no test coverage detected