Requirements and Resources
You have to modify the LinkedList class for this assignment. You have to convert it from being a singly-linked list class to a doubly-linked list class. There are comments in the source code (marked with ***) that indicate where modifications are needed.
Once you have modified LinkedList.java, you can compile it and run it. It has a built in test when run on its own.
Once you have the LinkedList class, you can then compile it with the rest of the programs linked to this assignment, and then run PlayDungeon. The dungeon.txt file is a data file used by PlayDungeon to create the dungeon. Can you figure out how to escape from the dungeon to the great outdoors?
- LinkedList.java: A generic singly-linked list class you are required to modify to become a doubly-linked list class.
- dungeon.txt: The data file used to populate the dungeon
- Item.java: A class representing an object in the dungeon.
- Path.java: A class representing a connection between rooms in the dungeon.
- Room.java: A class representing a room/place in the dungeon.
- Dungeon.java: A class representing the dungeon itself.
- PlayDungeon.java: The main program that runs game
Sample output: LinkedList
Passed: default constructor test
Passed: push_front(int) test
Passed: push_back(int) test
Passed: push(int) test
Passed: peek_front() test
Passed: peek_back() test
Passed: peek() test
Passed: insertAt(int, int) test
Passed: deleteAt(int, int) test
Passed: remove(int) test
Passed: set(int, T) test
Passed: copy constructor test
Passed: pop() test
Passed: pop_back() test
Passed: pop_front() test
Passed: pop* test
Passed: contains()
Passed: clear() test
Passed: empty() test
19 tests attempted
0 errors encountered
Passed tests: true
Sample output: PlayDungeon
You are in a large open computer lab
A large room with many computers that are available to the public.
Exits are: e, w, ne, nw, n, s
Enter command: n
You are in telecom room
A large room filled with racks of routers and switches. Blinking lights and cables are everywhere.
Exits are: s
Enter command: w
Unknown command. Try again.
You are in telecom room
Exits are: s
Enter command: s
You are in a large open computer lab
Exits are: e, w, ne, nw, n, s
Enter command: w
You are in the west hall intersection
A long, carpeted hallway running north-south.
Exits are: n, e, s, w, nw, ne
Enter command: inv
You are carrying: nothing
You are in the west hall intersection
Exits are: n, e, s, w, nw, ne
Enter command: look
You are in the west hall intersection
A long, carpeted hallway running north-south.
Exits are: n, e, s, w, nw, ne
Enter command: quit
Thanks for playing. Visit again soon.