Class SnakePart


public class SnakePart extends GameObject
GameObject to build snake.
  • Field Details

    • position

      public Vector2D position
    • color

      protected Color color
  • Constructor Details

    • SnakePart

      public SnakePart(Vector2D position, Color color)
      Constructor to set initial positions and color.
  • Method Details

    • render

      protected void render(Graphics2D g)
      Description copied from class: GameObject
      Method who render a object on screen (invoke on begin of each frames).
      Overrides:
      render in class GameObject