-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGame.java
More file actions
30 lines (27 loc) · 723 Bytes
/
Game.java
File metadata and controls
30 lines (27 loc) · 723 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
public interface Game {
/**
* Loads a BinaryTree file that has been saved as a preorder traversal.
* Interior nodes are prefixed by "Q:".
* Leaf nodes are prefixed by "G:"
* @param filename
* @return the root node
*/
public BinaryTreeNode<String> loadTree( String filename );
/**
* Saves the tree to the specified file.
* The tree is saved in a preorder fashion.
* Interior nodes are prefixed by "Q:".
* Leaf nodes are prefixed by "G:"
* @param filename
*/
public void saveTree( String filename );
/**
* Returns the root of the game tree.
* @return the root node of the tree
*/
public BinaryTreeNode<String> getRoot( );
/**
* Starts the guessing game.
*/
public void play( );
}