Beispiel #1
0
    public BodyParts(int col, int row) {
      this.position = new Position(col, row);
      bodyDrawing =
          new Rectangle(
              position.getCol() * Map.getCellSize(),
              position.getRow() * Map.getCellSize(),
              Map.getCellSize(),
              Map.getCellSize());

      Color color = speedUp ? Color.RED : Color.GREEN;
      bodyDrawing.setColor(color);
      bodyDrawing.fill();
    }