[Tutor] More or less final Chutes & Ladders
Alan Gauld
alan.gauld at btinternet.com
Sat Jan 4 10:27:56 CET 2014
On 04/01/14 04:47, Keith Winston wrote:
> Here is what I think will be about the final version of C and L.
Much better. Only one suggestion...
> def run_CandL(gamecount):
> tarray = CandL_Array()
> tarray.populate(gamecount)
> tarray.print_stuff()
Remove the middle line by making the array take a gamecount
argument and call populate from the init method. Why should the user
have to populate the class when it can do it itself?
Being picky I'm not keen on "stuff" as part of the name of
the final method call. Surely there a slkightly descriptive term
somewhere? print_stats, print_data, print_game_results etc?
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.flickr.com/photos/alangauldphotos
More information about the Tutor
mailing list