suppose in the context of a shooter game: class Matter { public String matterType; // "meat", "wood", "stone", "shell" public String texture; // "solid color", "strip", transparent" public int length, width, weight; public void Move(Direction direct) { } } class CreaturePart implements Matter { public boolean canMove, canOffBody; public CreaturePart connectsTo; // e.g. Wing connect to body public offBody() { Move(new Direction(random)); connectsTo = null; } } class Egg implements Matter { public Position position; // position in game world public boolean broken; // got shot? public CreaturePart parent; // for backing tracking } class SexFeature implements CreaturePart { public String name; // female, male public Object SpecialFunction() { // for female, return Egg; // for male, return something-else; } } class Wing implements CreaturePart { public String name; // "wing" public int index; // 1-left, 2-right, 3-??? } class Head implements CreaturePart { .... } class Chicken { public String name; // "chicken no.1" public Position position; // position in game world public Wing[] wings; public Leg[] legs; public Head[] heads; // be multiple in biohazard game public Body body; public SexFeature sex; public Object[] allParts; // point to wings/legs/heads/body, etc public void Walk(Direction direct, int distance) { } public void TryFly(int wingShakeNum) { while (wingShakeNum-- > 0) { Wing[0].Move(new Direction(OnBodyRandomMove)); Wing[1].Move(new Direction(OnBodyRandomMove)); } } public void Sound(int type) { // 1:zhi-zhi, 2:gu-gu, 3:@#@%~~&!#[email protected] } public void GetShot() { Sound(3); TryFly(10); for (CreaturePart part : allParts) if (part.canOffBody) part.offBody(); } }