The Formula for Replayable Games