forked from fenniless/BlueJ.TooLargeTooSmall
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
41 lines (33 loc) · 959 Bytes
/
Main.java
File metadata and controls
41 lines (33 loc) · 959 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
34
35
36
37
38
39
40
41
import java.util.Scanner;
/**
* Write a description of class Main here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Main
{
// instance variables - replace the example below with your own
private static Game currentGame;
private static int low, high;
private static Scanner input;
/**
* Constructor for objects of class Main
*/
public Main(){
}
public static void main(String[] args)
{
input = new Scanner(System.in);
System.out.println("Enter the lower bound (inclusive)");
low = input.nextInt();
input.reset();
System.out.println("Enter the upper bound (inclusive)");
high = input.nextInt();
input.reset();
currentGame = new Game(low, high);
while(!currentGame.getVictory()){
currentGame.check();
}
}
}