The film adapts Roald Dahl's 1964 novel, and Dahl received the screenplay credit, though the script was substantially rewritten by David Seltzer and Dahl publicly disowned the result. What carries over is the whole spine: the golden tickets, the five children, the factory tour, and the four disqualifications that are each a punishment fitted to a vice. The title change from Charlie to Wonka moved the centre of the film onto the adult, which is the clearest sign of the rewrite.
