-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathJeopardyDriver.java
More file actions
33 lines (30 loc) · 934 Bytes
/
JeopardyDriver.java
File metadata and controls
33 lines (30 loc) · 934 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
31
32
33
import java.util.Scanner;
import java.io.*;
/**
* Driver for Jeopardy Game
*
* @author Evan Sotos, Naman Agarwal, Jack Chalmers
* @version December 11 2016
*/
public class JeopardyDriver
{
public static void main(String [] args) throws IOException, FileNotFoundException, InterruptedException
{
boolean playGame = true;
Scanner scan = new Scanner(System.in); //Input object for Scanner
while (playGame)
{
Board newBoard = new Board(); // Creates new object of Board class
newBoard.startGame();
System.out.print("\n\t\t\tPlay again (y or n): ");
if (scan.nextLine().equalsIgnoreCase("Y"))
playGame = true;
else
{
playGame = false;
System.out.print("\f");
System.out.println("\n\n\t\t\tGame Over!");
}
}
}
}