One-dimensional hard-point gas as a thermoelectric engine.