AnimationProxy

AnimationProxy

AnimationProxy — bridges immutable piece singletons and their per-position animation state (frame counter).

Mirrors Java's AnimationProxy: every animated piece placed on the board gets its own proxy that tracks (x, y) and an independent frame counter. The piece itself stays immutable; the proxy carries the mutable frame state.

The Board maintains a list of these; AnimationManager walks the list each tick instead of scanning every cell.

Constructor

new AnimationProxy()

Source:

Classes

AnimationProxy

Methods

proxyFor()

Description:
  • True if this proxy represents the given piece at the given position.

Source:

setXY()

Description:
  • Update position without destroying/recreating the proxy (used when an agent moves to an adjacent cell).

Source:

tick()

Description:
  • Execute one animation frame: call piece.onFrame with the current counter, then increment it.

Source: