From 1363fa561bfec391c7772a510303ce7da88ae468 Mon Sep 17 00:00:00 2001 From: Andy Date: Sat, 10 Aug 2024 16:32:32 -0500 Subject: [PATCH] Added back randomizer for words --- src/main/java/uta/cse3310/Round.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/uta/cse3310/Round.java b/src/main/java/uta/cse3310/Round.java index 335f444..c54e760 100644 --- a/src/main/java/uta/cse3310/Round.java +++ b/src/main/java/uta/cse3310/Round.java @@ -72,10 +72,10 @@ public void startRound() { // Choose a random word from the list public void chooseRandomWord() { - this.currentWord1 = "apple"; // for testing purposes - this.currentWord2 = "banana"; - this.currentWord3 = "cherries"; - /*List words = loadWordsFromFile("src/filtered_words.txt"); + //this.currentWord1 = "apple"; // for testing purposes + //this.currentWord2 = "banana"; + //this.currentWord3 = "cherries"; + List words = loadWordsFromFile("src/filtered_words.txt"); Random random = new Random(); if (words != null && !words.isEmpty()) { int wordsToGuess = random.nextInt(3) + 1; @@ -98,7 +98,7 @@ else if(wordsToGuess == 3) { System.out.println("Chosen Word 2: " + currentWord2); System.out.println("Chosen Word 3: " + currentWord3); - }*/ + } } public void checkChar() {