private static StateChange constructStateChange( org.ucam.srcf.assassins.domain.proto.StateChange stateChange) { switch (stateChange.getType()) { case ADD_PLAYER: return convertAddPlayer(stateChange.getExtension(Base.addPlayer)); case KILL: return convertKill(stateChange.getExtension(Vanilla.kill)); default: throw new IllegalArgumentException( "Unrecognised StateChange type - " + stateChange.getType()); } }