Added Instructions

This commit is contained in:
Thomas Kwashnak
2022-01-06 13:22:56 -05:00
parent 45345d593d
commit 3d4f5c685a
2 changed files with 27 additions and 0 deletions

View File

@@ -27,7 +27,10 @@ public class HighIQ {
}
public void play() {
do {
printBoard();
while (!move()) {
System.out.println("ILLEGAL MOVE, TRY AGAIN...");
}

View File

@@ -2,10 +2,34 @@ import java.util.Scanner;
public class HighIQGame {
public static void main(String[] args) {
printInstructions();
Scanner scanner = new Scanner(System.in);
do {
new HighIQ(scanner).play();
System.out.println("PLAY AGAIN (YES OR NO)");
} while(scanner.nextLine().equalsIgnoreCase("yes"));
}
public static void printInstructions() {
System.out.println("HERE IS THE BOARD:");
System.out.println(" ! ! !");
System.out.println(" 13 14 15\n");
System.out.println(" ! ! !");
System.out.println(" 22 23 24\n");
System.out.println("! ! ! ! ! ! !");
System.out.println("29 30 31 32 33 34 35\n");
System.out.println("! ! ! ! ! ! !");
System.out.println("38 39 40 41 42 43 44\n");
System.out.println("! ! ! ! ! ! !");
System.out.println("47 48 49 50 51 52 53\n");
System.out.println(" ! ! !");
System.out.println(" 58 59 60\n");
System.out.println(" ! ! !");
System.out.println(" 67 68 69");
System.out.println("TO SAVE TYPING TIME, A COMPRESSED VERSION OF THE GAME BOARD");
System.out.println("WILL BE USED DURING PLAY. REFER TO THE ABOVE ONE FOR PEG");
System.out.println("NUMBERS. OK, LET'S BEGIN.");
}
}