Class PainterLeagueFigure


  • public class PainterLeagueFigure
    extends PainterFigure
    Painter for league figures.
    • Constructor Detail

      • PainterLeagueFigure

        public PainterLeagueFigure​(PainterFactory painterFactory)
        Creates a PainterPlayerFigure.
        Parameters:
        painterFactory - The factory.
    • Method Detail

      • paint

        public void paint​(Graphics g,
                          ThingState t,
                          GameState state,
                          int xCenter,
                          int yCenter,
                          int repaintCounter)
        Paints the figure.
        Overrides:
        paint in class PainterFigure
        Parameters:
        g - The graphics.
        t - The figure.
        state - The GameState.
        xCenter - The x center coordinate.
        yCenter - The y center coordinate.
        repaintCounter - The repaint counter.
      • paintFigureImage

        protected void paintFigureImage​(Graphics g,
                                        FigureState f,
                                        GameState state,
                                        int xc,
                                        int yc,
                                        double factor)
        Paints the figures image.
        Overrides:
        paintFigureImage in class PainterFigure
        Parameters:
        g - The graphics.
        f - The figure.
        state - The GameState.
        xc - The x center coordinate.
        yc - The y center coordinate.
        factor - Scaling factor.
      • getFigureImage

        protected java.lang.String getFigureImage​(FigureState f)
        Returns the current figure Image for the given figure, depending on it's energy level.
        Overrides:
        getFigureImage in class PainterFigure
        Parameters:
        f - The figure to get the image for.
        Returns:
        The image.