[LRUG] Battleship: Ruby Fight Club

Paul Battley pbattley at gmail.com
Sat Oct 1 14:00:32 PDT 2011


On 29 September 2011 11:22, Paul Battley <pbattley at gmail.com> wrote:
> On 29 September 2011 10:24, Tim Cowlishaw <tim at timcowlishaw.co.uk> wrote:
>> 3) Does all the code required by the player need to be contained in
>> the one file, or can it require other files?
>
> I'm inclined to say that it should be contained in one file, unless
> anyone disagrees …

On reflection, I think it'll probably be clearer for the show and tell
part if the source code isn't just one monolithic file, so:

* you can require files from players/lib

It's added to the path, so if you have a file in, say,
players/lib/foo/bar.rb, you can do "require 'foo/bar'".

Paul.



More information about the Chat mailing list