Typo Fixes

This commit is contained in:
Thomas Kwashnak
2022-01-06 13:15:48 -05:00
parent 048b9c31a2
commit 18016b59ed
2 changed files with 4 additions and 4 deletions

View File

@@ -9,7 +9,7 @@ public class HighIQ {
private PrintStream out;
private Scanner scanner;
public HighIQ(Scanner sccanner) {
public HighIQ(Scanner scanner) {
out = System.out;
this.scanner = scanner;
board = new HashMap<>();
@@ -70,7 +70,7 @@ public class HighIQ {
} while(!isGameFinished());
int pegCount = 0;
for(Integer key : board.getKeySet()) {
for(Integer key : board.keySet()) {
if(board.getOrDefault(key,false)) {
pegCount++;
}
@@ -92,7 +92,7 @@ public class HighIQ {
public boolean isGameFinished() {
for(Integer key : board.getKeySet()) {
for(Integer key : board.keySet()) {
if(board.get(key)) {
//Spacing is either 1 or 9
//Looking to the right and down from every point, checking for both directions of movement

View File

@@ -6,6 +6,6 @@ public class HighIQGame {
do {
new HighIQ(scanner).play();
System.out.println("PLAY AGAIN (YES OR NO)");
} while(scanner.nextLine().toLowerCase().equals("yes"));
} while(scanner.nextLine().equalsIgnoreCase("yes"));
}
}