chiark / gitweb /
Extend InertPieceTrait to support multiple faces
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 11 Apr 2022 09:18:12 +0000 (10:18 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 11 Apr 2022 09:25:55 +0000 (10:25 +0100)
commit48f1165e3bfe31a4df2b189cda87982eec378bd3
treeb37b8577fcf75c47943219180dda293f2922aa27
parent4df0e41bdf1ed899d55ed6122acafeb2c76ba2fe
Extend InertPieceTrait to support multiple faces

We want this because we want to use InertPiece for dice and a die can
have multiple faces, which we want to specify as a single piece.  Ie,
the die face images will be an inert version of the die.

No functional change right now - we just move the default() call out
from the trait impls to each of the call sites.  In the shapelib
impl (which is the only impl right now) we pass through the face to
the rendering code (which lives in the main PieceTrait impl).

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/gamestate.rs
src/pcrender.rs
src/shapelib.rs