What parts of this thing become the module and what bits should be in package::main?
Should the map and description files be read into the object as instance or a class variables
Could this be expanded to support multiple players without doing much to it other than adding the network code?
In order:
None of the bits "should" be in the main. If you want it really really opaque, then make it so that the command text is passed in the sub call from main, and the reply text is spit back. It would look something like
my $game = Game::Adventure->new($file) #file provides data
while (<>) {
print $game->($_);
}
I'd do game data as instance variables, mainly because it seems more, well, OO. (I could be very wrong here, of course.)
I think you'd essentially have to write a wrapper containing the network code, where the network code is called by the UI and the game code's called by the network. (Maybe that's how it's always done. Network programming is something I know doodly about.) You are going to need to add player data, and you'll need that in the game code and not the network code, but that's the only major addition I can see. (Or, if you don't care, you could just have a generic player description. That seems less fun, though.)