LLD Logo
LVL1
Flyweight Pattern

Step 1 of 4 · Separate intrinsic character data

1

Your task

Separate intrinsic character data

Keep character, font, and size on the shared concrete flyweight.

Define the flyweight rendering interface.
Store character, font, and size on Character.
Pass position and color into render instead of storing them.

character_flyweight.py

Your draft · saved locally

1

Structural feedback only—your code stays in this browser and is not executed.