From 3d4f5c685adbb4865e707490474cf039efacd9c7 Mon Sep 17 00:00:00 2001 From: Thomas Kwashnak Date: Thu, 6 Jan 2022 13:22:56 -0500 Subject: [PATCH] Added Instructions --- 48_High_IQ/java/src/HighIQ.java | 3 +++ 48_High_IQ/java/src/HighIQGame.java | 24 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/48_High_IQ/java/src/HighIQ.java b/48_High_IQ/java/src/HighIQ.java index 5c3f31aa..a0278771 100644 --- a/48_High_IQ/java/src/HighIQ.java +++ b/48_High_IQ/java/src/HighIQ.java @@ -27,7 +27,10 @@ public class HighIQ { } public void play() { + + do { + printBoard(); while (!move()) { System.out.println("ILLEGAL MOVE, TRY AGAIN..."); } diff --git a/48_High_IQ/java/src/HighIQGame.java b/48_High_IQ/java/src/HighIQGame.java index 4df22853..e74e5783 100644 --- a/48_High_IQ/java/src/HighIQGame.java +++ b/48_High_IQ/java/src/HighIQGame.java @@ -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."); + } }