You can reuse as much code from my sample game as you like (which will probably be most of it, except for the room descriptions). However, you will also need to do some some original programming, such as adding new commands or new behaviors of objects. I could give you examples, but you are sure to discover the need for additional programming as you develop your game.
Finally, keep your game short. It's easy to get involved in writing an interesting plot with lots of rich detail (and I certainly don't mind that), but remember that this is a computer course, not an English course, and I'll be more interested in the quality of your code than in the quality of your plot.