JavaDoc

1 reply [Last post]
Offline
Joined: 11/18/2012

I was wondering if the javadoc for the game engine is up to date

 since i rely to much in viewing the javadoc for learning on how

the classes are used.

 

I was learning from the tutorial in the lessons tab and i got confused in

how the Room exit for the game is created because when i viewed the javadoc

the game exit is done by public void setExit(String direction, Room room) but

the lesson from the tutorial uses public void setExits(Room room, Room room).

 

 

 

 

Offline
Joined: 12/13/2010
You are looking at 2

You are looking at 2 different versions of the world of zuul game.  World of zuul version 1 is an example of a "bad" design, with the method signature

Room.setExits(Room west, Room east)

version 2 is an example of a "good" design, and has the signature

Room.setExit(String direction, Room exit)

Have a look at the exercise surrounding these two versions here:  http://www.env3d.org/beta/node/30

Let me know if this helps.