Skip navigation links
A B C D E G H I M N P R S T 

A

addEdge(String, String, int) - Method in class skeleton_SpyGraph
Adds v2 as a neighbor of v1 and adds v1 as a neighbor of v2.
addEdge(String, String, int) - Method in class SpyGraph
Adds v2 as a neighbor of v1 and adds v1 as a neighbor of v2.
addGraphNode(String) - Method in class skeleton_SpyGraph
Add a vertex with this label to the list of vertexes.
addGraphNode(String) - Method in class SpyGraph
Add a vertex with this label to the list of vertexes.
addNeighbor(GraphNode, int) - Method in class GraphNode
Maintains sorted order of neighbors by neighbor name.

B

BFS(String, String) - Method in class skeleton_SpyGraph
Return Breadth First Search list of nodes on path from one Node to another.
BFS(String, String) - Method in class SpyGraph
Return Breadth First Search list of nodes on path from one Node to another.

C

compareTo(GraphNode) - Method in class GraphNode
Return the results of comparing this node's name to the other node's name.
compareTo(Neighbor) - Method in class Neighbor
Compares the node names of this node and the otherNode.
createGraphFromAreaFile(String) - Static method in class Game
Builds the Graph from the area data file.

D

decreaseBudget(int) - Method in class Player
Subtract the dec amount from the budget.
DFS(String, String) - Method in class skeleton_SpyGraph
Return Depth First Search list of nodes on path from one Node to another.
DFS(String, String) - Method in class SpyGraph
Return Depth First Search list of nodes on path from one Node to another.
Dijkstra(String, String) - Method in class skeleton_SpyGraph
OPTIONAL: Students are not required to implement Dijkstra's ALGORITHM Return Dijkstra's shortest path list of nodes on path from one Node to another.
Dijkstra(String, String) - Method in class SpyGraph
OPTIONAL: Students are not required to implement Dijkstra's ALGORITHM Return Dijkstra's shortest path list of nodes on path from one Node to another.
displayCostToEachNeighbor() - Method in class GraphNode
Prints a list of neighbors of this GraphNode and the cost of the edge to them
dropSpycam() - Method in class Player
If there are no remaining spy cams to drop, display "Not enough spycams" and return false.

E

example - Static variable in exception InvalidAreaFileException
 

G

Game - Class in <Unnamed>
 
Game() - Constructor for class Game
 
getBudget() - Method in class Player
Return the amount remaining in this player's budget.
getCost() - Method in class Neighbor
Returns the cost of travelling this edge to get to the Neighbor at the other end of this edge.
getCostTo(String) - Method in class GraphNode
 
getLocation() - Method in class Player
Returns the node where the player is currently located.
getLocationName() - Method in class Player
Returns the name (label) of the node where the player is currently located.
getLocationName() - Method in class Spy
 
getName() - Method in class Player
Return the name of the player.
getNeighbor(String) - Method in class GraphNode
 
getNeighborNames() - Method in class GraphNode
Returns and iterator that can be used to find neighbors of this GraphNode.
getNeighborNode() - Method in class Neighbor
Returns the Neighbor (node) that is at the other end of "this" node's edge.
getNeighbors() - Method in class GraphNode
Returns a list of the neighbors of this GraphNode instance.
getNodeFromName(String) - Method in class skeleton_SpyGraph
 
getNodeFromName(String) - Method in class SpyGraph
 
getNodeName() - Method in class GraphNode
Return the name of this GraphNode.
getRandomNode() - Method in class skeleton_SpyGraph
DO NOT EDIT THIS METHOD
getRandomNode() - Method in class SpyGraph
DO NOT EDIT THIS METHOD
getSpycam() - Method in class GraphNode
 
getSpycamBack(boolean) - Method in class Player
If pickupSpyCam is true, increment the number of spy cams remaining.
getSpycams() - Method in class Player
Returns the number of spy cams available to drop.
GraphNode - Class in <Unnamed>
 
GraphNode(String) - Constructor for class GraphNode
Represents a valid location in the game graph.

H

help() - Static method in class Game
Prints the possible commands a player can enter

I

init(String, String) - Method in class Game
 
InvalidAreaFileException - Exception in <Unnamed>
 
InvalidAreaFileException(String) - Constructor for exception InvalidAreaFileException
 
isAt(String) - Method in class Spy
 
isNeighbor(String) - Method in class GraphNode
Returns true if this node name is a neighbor of current node.
iterator() - Method in class skeleton_SpyGraph
Return an iterator through all nodes in the SpyGraph
iterator() - Method in class SpyGraph
Return an iterator through all nodes in the SpyGraph

M

main(String[]) - Static method in class Game
 
main(String[]) - Static method in class Test
Call the test methods you've written.
map(SpyGraph, String, String) - Static method in class Game
Display different paths from the start node to the selected "end" node.
move(Player, String) - Static method in class Game
 
move(String) - Method in class Player
Change the location of the player to the specified node.
move(String) - Method in class Spy
Prints the location of the spy if specified by reveal Return false if spy has no moves to make

N

Neighbor - Class in <Unnamed>
Used by GraphNode class to keep a list of 'this' node's neighbors and the cost to reach each of those neighbors.
Neighbor(int, GraphNode) - Constructor for class Neighbor
A neighbor is added to an existing GraphNode by creating an instance of Neighbor that stores the neighbor and the cost to reach that neighbor.
NOT_NEIGHBOR - Static variable in class GraphNode
A value that can be used if a cost is needed even if the GraphNode is not a neighbor of a node.
NotNeighborException - Exception in <Unnamed>
 
NotNeighborException() - Constructor for exception NotNeighborException
 

P

pickupSpycam(GraphNode) - Method in class Player
Check the node to see if there is a spy cam.
Player - Class in <Unnamed>
Represents a player in the Spy Game.
Player(String, int, int, GraphNode) - Constructor for class Player
Constructs an instance of Player to track location and other information for the player.
printNeighborNames() - Method in class GraphNode
Display's the node name followed by a list of neighbors to this node.
printSpyCamLocations() - Method in class Player
Display the names of the locations where Spy Cams were dropped (and are still there).

R

revealLocation() - Method in class Spy
 
RNG - Static variable in class Game
LEAVE THIS AS IS SO THAT RESULTS CAN BE REPEATED After program due date, you may change to make it pseudo-random selection.

S

setSpycam(boolean) - Method in class GraphNode
 
skeleton_SpyGraph - Class in <Unnamed>
Stores all vertexes as a list of GraphNodes.
skeleton_SpyGraph() - Constructor for class skeleton_SpyGraph
Initializes an empty list of GraphNode objects
Spy - Class in <Unnamed>
 
Spy(SpyGraph, int) - Constructor for class Spy
 
SpyGraph - Class in <Unnamed>
Stores all vertexes as a list of GraphNodes.
SpyGraph() - Constructor for class SpyGraph
Initializes an empty list of GraphNode objects

T

Test - Class in <Unnamed>
Add test methods and call them here to facilitate testing the code you add.
Test() - Constructor for class Test
 
test_BFS_vs_DFS() - Static method in class Test
Test that DFS and BFS give expected results for a graph we know.
test_SortList() - Static method in class Test
Create some nodes in random order, store them, display the list, sort the list, display
toString() - Method in class GraphNode
 
toString() - Method in class Neighbor
Returns a String representation of this Neighbor.
A B C D E G H I M N P R S T 
Skip navigation links