[Bluej-discuss] Exercise 7.7 printLocation method on page 181

Luis Moreira Luis.Moreira at jet.uk
Mon Mar 27 08:45:10 BST 2006



Hi Chris,
Have you had a look at code 7.6 pag 196?
Before you look at it this is how I see it:
- You create a room in Game
- You set exits
- So Room as now the exits info
- You then create a method that gets a String with all the exits
available by checking if exits i.e northExit,eastExit and so on are null
and keep on adding to the String if not.
- Now you have a String that has all the exits available, so in Game you
just need to add to the printLocationInfo() method, the line
System.out.println(currentRoom.getExitString()).
Anyway this is the way I have done it and of course there are many ways
to solve this which may be better, but it does work. 
Hope it helps
Best regards
		Luis

-----Original Message-----
From: bluej-discuss-bounces at bluej.org
[mailto:bluej-discuss-bounces at bluej.org] On Behalf Of Chris Gaiger
Sent: 27 March 2006 06:59
To: bluej-discuss at bluej.org
Subject: [Bluej-discuss] Exercise 7.7 printLocation method on page 181

The printLocation method, exercise 7.7 on page 181.
I just can't seem to get my head around this.  I have made all the
changes up to this point.  Can someone please give me the full code for
this method so that i can figure out what is happening.  It is probably
something so easy staring me in the face but i just can't see it.

-- 
-
Free Email at http://www.MailPuppy.com
- Fraud Warning:  Never accept foreign checks/money orders

_______________________________________________
mailing list bluej-discuss at bluej.org
To unsubscribe or change your preferences, go to
http://lists.bluej.org/mailman/listinfo/bluej-discuss


More information about the bluej-discuss mailing list